0

No matter what I do, I always get the numeric value from the ASCII chart. In this case I get 104, even though I denote Name[2] as a character.

string Name= "John";

		cout << tolower (  char ( Name[2]) ) << endl;
3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by firstPerson
1

>>No matter what I do, I always get the numeric value from the ASCII chart. In this case I get 104, even though I denote Name[2] as a character

Thats because tolower() prototype is declared as, int tolower(int c).
So it takes a int and returns a int.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.