| ForRealzZzZ (6) | |
|
This is sort of a dumb question but, how do you use a for loop to iterate through strings to display them in a console? | |
|
|
|
| Smac89 (201) | |
|
for (int w = 0; w < (int)strlen(mystring); w++) { printf("%c", mystring[w]); } for (int w = 0; w < (int)mystring.length(); w++) { std::cout <<mystring[w]; } | |
|
|
|
| ForRealzZzZ (6) | |||
I get an error for index.length() it says that it must be a class, struct, or union | |||
|
|
|||
| Smac89 (201) | |||
| |||
|
|
|||