Обсуждения
Cin/cout/cerr
0 голосов
1 ответI can use "printf" in C ++.
1 голос
2 ответовhow to use c++to output Chinese
0 голосов
3 ответовNo output in my code???
0 голосов
3 ответовIf-else problem
1 голос
6 ответовExecution time
1 голос
1 ответC++ Question
3 голосов
3 ответовC++ Question
3 голосов
1 ответWhat's wrong?! Please! Help me!!
2 голосов
13 ответовWhat is wrong with this
0 голосов
2 ответовHow can declare a word?
0 голосов
2 ответовIs making a game app hard?
1 голос
6 ответовWhat's wrong?!
2 голосов
3 ответовPost- cin Text?
0 голосов
3 ответовIn 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 голосов
8 ответовcan 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 голосов
8 ответовWhy it doesn't work?!
2 голосов
5 ответовАктуальное сегодня
What is a web browser intension?
1 Votes
Mentors
1 Votes
python
0 Votes
Thread local : global vs local
0 Votes
Postgrrsql and python
0 Votes
Codding lern
0 Votes
Data Analysis Course
1 Votes
Is there LUA?
0 Votes