Simplest(!) string problem

1
2
3
4
5
6
char a[5];
cout<<"Enter word: ";
cin.get(a, 6, '\n');
cin.ignore(2000, '\n');

cout<<//? 


If I input a word "Hello"; and I want to display an individual letter from that; for example 'H', or 'l' or 'o', what should be in cout part?
Anyone there to help?
use a std::string not a char array, then use the [] operator.
Topic archived. No new replies allowed.