New to C++ please help

HI there, I'm totally new to C++ .
In a homework i have given the assigment to find the ASCII code for some characters.
for example Caps A = 65
Now, in a question they ask me to find the ASCII code for '4' and then the next question is for 4 (without single quotes).what is the difference?
In the same way they ask me to find it for 0 (cero) and then for '0' (with single quotes)
Can you help ???
Need to know the difference between them not only the answer.

Thanks
asciitable.com

Now, in a question they ask me to find the ASCII code for '4' and then the next question is for 4 (without single quotes).

'4' is a character. It's that symbol on your keyboard just above the 'R'. 4 is the number four. The number four is not a symbol; it is a value.
Last edited on
You can find it with C++ itself as ->
1
2
3
4
5
6
7

int n = 127;

for(int i = 0 ; i < n ; i++){
	cout<<"character : "<< char ( i ) << " the ASCII code = " <<          
                         (int ) (char ( i ) ) <<endl;
}
Last edited on
Thank you very much for your help. I really appreciated.
Topic archived. No new replies allowed.