why does this program show returned 1 in error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

why does this program show returned 1 in error

#include<iostream> using namespace std; int main() { cout << "I love C++" << endl; return 0; }

10th Oct 2017, 8:45 AM
arshpreet
arshpreet - avatar
2 Answers
+ 14
#include<iostream> using namespace std; int main() { cout << "I love C++" << endl; return 0; } //is same as #include<iostream> using namespace std; int main() { cout << "I love C++" << endl; return 1; } //is same as #include<iostream> using namespace std; int main() { cout << "I love C++" << endl; } Ask your question precisely if any, my friend.
10th Oct 2017, 9:10 AM
Babak
Babak - avatar
0
so what should i do then?
10th Oct 2017, 8:52 AM
arshpreet
arshpreet - avatar