Mega Code Archive
Accessing characters in string objects
#include
#include
using namespace std;
int main(){
char charray[80];
string word;
cout << "Enter a word: ";
cin >> word;
int wlen = word.length();
cout << "One character at a time: ";
for(int j=0; j