+ 1
I need help with my code. When I tried running it they said I should input a primary statement before the return.
#include <iostream> using namespace std; int main() { cout<<"C++ is cool">> return 0; }
6 Respuestas
+ 2
That's because instead of >> you should put ;
Or <<endl;
+ 2
statement in c++ is terminated by semi-colon (;) and not by ">>"
So the correct code:
#include <iostream>
using namespace std;
int main() {
cout << "C++ is cool" << endl;
return 0;
}
Please relearn your c++ course.
0
33
0
Hi
0
Hi
- 2
Thanks