这是代码,如果有什么问题请帮助我。
#include <iostream>
int main() {
char ch = 'A';
int num = ch;
cout << "The ASCII code for " << ch << "is " << num << "\n";
cout << "Adding 1 to the character code : \n";
ch = ch + 1;
num = ch;
cout << "The ASCII code for " << ch << "is " << num << "\n";
return (0);
}
我得到像这样的错误
ex1.cpp: In function ‘int main()’:
ex1.cpp:6:5: error: ‘cout’ was not declared in this scope
ex1.cpp:6:5: note: suggested alternative:
/usr/include/c++/4.6/iostream:62:18: note: ‘std::cout’
各位大侠请指正我的错误。