+ 2
How do I Extract Single letter from a given word in c++?
I am a beginnner and I am writing a code where i am supposed to extract characters from a word. Eg:- The input "CODE" would return "C", "O", "D", "E" Any help would be much appreciated.
2 Answers
+ 6
string word="code";
char a=word[0];
char b=word[1]; e.t.c
strings behave like arrays
0
Thank you guys! I got my program to work.