I understand the first code is casting a char into an interger. But I don’t understand the second one? Is it ment to be a function or? Can someone please help me understand thanks.
as a side note, char is already a 1 byte int.
cout is 'smart' and prints a symbol when it sees type char. for most everything else, you don't need the cast, eg
for(int something = 42, char c = 0; c < 100; c++) //fine without casts
something *= c; //ok without casts.