F&A Diskussionen
Cin/cout/cerr
0 Stimmen
1 AntwortI can use "printf" in C ++.
1 Stimme
2 Antwortenc++
1 Stimme
3 AntwortenHelp
0 Stimmen
3 Antwortenhow to use c++to output Chinese
0 Stimmen
3 AntwortenNo output in my code???
0 Stimmen
3 AntwortenIf-else problem
1 Stimme
6 AntwortenExecution time
1 Stimme
1 AntwortC++ Question
3 Stimmen
3 AntwortenC++ Question
3 Stimmen
1 AntwortWhat's wrong?! Please! Help me!!
2 Stimmen
13 AntwortenWhat is wrong with this
0 Stimmen
2 AntwortenHow can declare a word?
0 Stimmen
2 AntwortenIs making a game app hard?
1 Stimme
6 AntwortenWhat's wrong?!
2 Stimmen
3 AntwortenPost- cin Text?
0 Stimmen
3 AntwortenC++ help
-1 Stimme
2 AntwortenIn the code below the output is 2. This code is used in a challenge and I get an error when I select the answer 2. It accepts as correct the answer 1 which I believe is wrong. If you agree please thumbs up.
If you find any other errors please post them here!
#include <iostream>
using namespace std;
int main()
{
for(int i=1; i>=1; i++) {
if(i<1 || i>1){
cout << i;
break;
}
}
return 0;
}
8 Stimmen
8 Antwortencan anyone plz explain me this program step by step?#include <iostream>
using namespace std;
class MyClass {
public:
int var;
MyClass() { }
MyClass(int a)
: var(a) { }
MyClass operator+(MyClass &obj) {
MyClass res;
res.var= this->var+obj.var;
return res;
}
};
int main() {
MyClass obj1(12), obj2(55);
MyClass res = obj1+obj2;
cout << res.var;
}I am not getting the part inside operator+
0 Stimmen
8 AntwortenWhy it doesn't work?!
2 Stimmen
5 AntwortenHeute heiร
Learn python
2 Votes
Help for study
1 Votes
Spying on me
1 Votes
Where's PHP and Ruby courses?
1 Votes
Detach thread exception
1 Votes
Qt timer timeout
0 Votes
Not video
0 Votes
Not image in the page
0 Votes