2
rated 0 times
[
2]
[
0]
/ answers: 1 / hits: 1232
/ 1 Year ago, sun, march 19, 2023, 4:36:45
#include<iostream>
int main()
{
char ch = 'A';
int num = ch;
cout << "The ASCII code for " << ch << "is " << num << "
";
cout << "Adding 1 to the character code :
";
ch = ch + 1;
num = ch ;
cout << "The ASCII code for " << ch << "is " << num << "
";
return (0);
}
I get the errors like
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’
Guys please correct my mistakes.
More From » 12.04