\Device\NUL
shriman_deepak
\Device\NUL
Extra note
The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char. If the argument c is
of type char, it must be cast to unsigned char, as in the following example:
char c;
...
res = toupper((unsigned char) c);
This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to
int, yielding a value that is outside the range of unsigned char.
The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter
in the default C locale.
Madhavi
I need help with:
Struct a []{
Int data,
Int valid
}
Array [4];
If (a[1].valid==1 && a[2].valid==1 && a[3].valid==1){
Return false;
}
How to code this logic with for loop
Madhavi
Pavel
\Device\NUL
Jojo
Hello need help on repairing windows recovery, any one
Madhavi
I need help with:
Struct a []{
Int data,
Int valid
}
Array [4];
If (a[1].valid==1 && a[2].valid==1 && a[3].valid==1){
Return false;
}
How to code this logic with for loop
\Device\NUL
Madhavi
for (int i=0 ; i < 3 ; i++){
// what logic to put here for
Check if(a[1].valid ==1 && .......)
}
\Device\NUL
Madhavi
But how about the && of all the index
Madhavi
Logic i am thinking is too create a number a[1].valid|a[2].valid |a[3].valid if number is 111 .. check buy number && 111 if result is 111 return false
Madhavi
Any other better optio
klimi
you want to put int into bits?
Sachin
#include <iostream>
#include <vector>
#include<algorithm>
using namespace std;
int main()
{
vector<vector<int>> ans;
vector<int> v;
v.push_back(1);
v.push_back(2);
v.push_back(3);
ans.push_back(v);
v.clear();
v.push_back(4);
v.push_back(5);
v.push_back(6);
v.push_back(7);
ans.push_back(v);
v.clear();
v.push_back(8);
v.push_back(9);
v.push_back(10);
v.push_back(11);
ans.push_back(v);
v.clear();
for(auto it: ans)
{
for(auto k: it)
cout<<k<<" ";
}
//OUTPUT 1 2 3 4 5 6 7 8 9 10 11
reverse(ans.begin(),ans.end());
cout<<"\n";
for(auto it: ans)
{
for(auto k: it)
cout<<k<<" ";
}
//OUTPUT 8 9 10 11 4 5 6 7 1 2 3
return 0;
}
I want output to be 11 10 9 8 7 6 5 4 3 2 1
Sachin
any one who know this?
Sachin
how ?
Konstantin
how ?
It's your code. You almost did it once.
Obviously you can cycle through vectors in ans and use reverse with each.
Sachin
for(auto it: ans)
{
reverse(it.begin(),it.end());
}
Sachin
this?
Misagh
Baka
Johnson
Please guys can anyone help me to convert this to a for loop
char *_strcat(char *dest, char *src)
{
int a;
int b;
a = 0;
while (dest[a] != 0)
{
a++;
}
b = 0;
while (src[b] != 0)
{
dest[a] = src[b];
a++;
b++;
}
return (dest);
}
Johnson
For loop usually requires a statement and the increment is passed as a statement in the for loop parenthesis but the while loop has it's increment within the curly braces. Converting it to a for loop has been an issue. Kindly help and explaintion will do. Thanks in advance
Sachin
\Device\NUL
\Device\NUL
for (i = 0; arr[i] != '\0'; i++)
Nothing hard
Sachin
Anonymous
Pavel
Please give me some articles , books
If you passed beginner level I suggest these 3 books: Effective C++, More Effective C++, Modern Effective C++ from Scott Meyers
Then fluentcpp.com is a good resource for advanced reading.
I don't have good suggestions for complete beginners, I was learning by shitty books, making mistakes and asking questions on toxic russian programming forums 😄
Try also this:
Anonymous
Ali
Find the errors in the following code and explain why. include <iostream>
using namespace std;
class Book {
public:
Book(int i = 0 );
void displayId();
private:
int id;
};
Book::Book(int i) {
id = i;
}
void Book::displayId()
{
cout << id << endl;
}
void main() {
Book X( 10 );
Book* Y;
Y = new Book( 20 );
X.displayId();
Y.displayId();
(*Y).displayId();
Y->displayId();
delete Y;
delete X;
delete &X;
Y = &X;
Y->displayId();
delete Y;
Y = new Book( 30 );
Y = new Book( 40 );
delete Y;
delete Y;
}
Nobody🪲
#include<stdio.h>
int main()
{
int bs,da,hra;
float gs;
printf("please enter your basic salary ");
scanf("%d",&bs);
da=bs*.4;
hra=bs*.2;
gs=da+bs+hra;
printf("%f",gs);
getch();
}
Nobody🪲
Whats wrong with this code..if i input 30,000 the gross salary comes 48,000 but in online solution ans is 18,000 why they substrate
Ludovic 'Archivist'
Ludovic 'Archivist'
So yes, bs + bs*0.6 is more than bs
Norah
Please I have error in dec c++ say (Id returned 1exite status)
Norah
klimi
Norah
klimi
Norah
klimi
Dev c++
Oh... Okay... Well that doesn't provide nearly any information about your problem
𝕯𝖆𝖛
#algorithm #rectangle_query #rtree #c++
Hello,
I am doing a rectangular query on the rectangles given in the plane.
Rectangles intersecting the query rectangle are returned at the end of the problem.
I use Rtree. But I do not understand many things.
Please help և give directions.
Sonny
Jojo
C GUI and c event handler....are this real
Anonymous
Yash
Please help...
\Device\NUL
Adriano
You need to give a name for the parameter when you define it the function,
Adriano
Like "void created (int name_here)
Yash
Thank you broo...
let me try it....
Yash
Yash
🙏Thanks...
Sid
Any one please suggest any source for problem solving of c++
Sid
I want to practice more and more
Yongyi
Can you help me to write code of Diamond shape in c programming? Please
Sandeepta
tcs codevita mario3 solution
Sandeepta
How
shriman_deepak
vec(m+1,0) mean empty vector of size m+1 ?
Anonymous
Sid
Sid
C++
Anonymous
Sid
And web source where I can practice?
Anonymous
Sid
Means I had recently completed the theory of those topics and want a bunch of question
Sid
For practice
Sid
Okey
Anonymous