これはコードです。何か問題があれば助けてください。
#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’
みんな私の間違いを訂正してください。