Unknown error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Unknown error

i keep getting an error i've never seen before and it has me beat. Could you help me? Thanks // P.s. Im a beginner #include <iostream> using namespace std; int main() { int A; bool B; cin >> B; cin >> A; if (A == 0) { cout << "wrong password";} endl; return 0; }

21st Aug 2017, 4:23 PM
Tyrell Reid
Tyrell Reid - avatar
4 Answers
+ 4
endl; cannot be used alone. It should be like- cout<<endl; or the way Muhammed Arshad shows.
21st Aug 2017, 4:48 PM
Sachin Artani
Sachin Artani - avatar
+ 4
endl; cannot be used alone. It should be like- cout<<endl; or the way Muhammed Arshad shows.
21st Aug 2017, 4:48 PM
Sachin Artani
Sachin Artani - avatar
+ 1
There is a small mistake while using endl. the corrected pgm is #include <iostream> using namespace std; int main() { int A; bool B; cin >> B; cin >> A; if (A == 0) { cout << "wrong password"<<endl;} return 0; }
21st Aug 2017, 4:34 PM
Muhammed Arshad S
Muhammed Arshad S - avatar
0
oooh thanks so much I didn't notice that lol
21st Aug 2017, 9:11 PM
Tyrell Reid
Tyrell Reid - avatar