+ 1
Error cin and cout were not declared
hi guys i am a beginner in c++ kindly help me it says cout and cin were not declared
31 Respuestas
+ 18
Did you include header file iostream?
#include<iostream>
+ 7
because turbo c++ does not use standard c++ it is from last century.
+ 6
#include <iostream>
using std::cout;
int main() {
cout << "This should also work\n";
return 0;
}
+ 4
Yup, should be one or both of these answers. Otherwise, you'll need to post some code.
+ 4
typos.. well the number one 1 and the lowercase L look pretty similar in codeplayground
+ 4
not here. the best you can do here is ascii art in cpp. elsewhere yes. with the help of other libraries, (or you could even write your own lol; they are huuuge projects)
+ 4
no, only the basics of the langauage. but by learning the language you will know how to talk to the libraries.
+ 4
yeah, not fair right. codeplayground has limited support for compiled languages
+ 3
You may need to add:
using namespace std;
below your include statements.
+ 3
thanks guys it worked perfect i am in debt of you guys sirry i cant upvote comment as my account is not activated but i followed you two thanks again
+ 2
It's endl not end1 and make sure you have your semicolons.
+ 1
You need to end every statement with a semicolon!
+ 1
guys can i make a graphical like with c++
+ 1
but people made calcuLtor using html
+ 1
yeah this is absolutely not fair limited support in compiled languages
0
you don't need "using namespace std" in turbo c++
0
thanks a lot guys for helping me
https://code.sololearn.com/c53S4Fpi9b30/?ref=app
this is the code plz plz tell mistakes in it
thanks again to everyone who answered my question
0
that problem was solved but still it doesnot give output i want plz help
0
#include <iostream>
using namespace std;
int main() {
int a;
int b;
int sum;
cin>>a;
cin>>b;
sum=a+b;
cout<<sum<<endl;
return 0;
}
0
oh thank you i am Trying