Hints with a code creation.
A string is nothing more than an array of chars. Both of these are the same:
1 2
|
char word[6] = "Hello";
string word = "Hello";
|
Unless it is a requirement, it is much simpler to just use string. Strings still have indexes and
cout << word[1];
would print e in either case.
Topic archived. No new replies allowed.