SyntaxFix
Write A Post
Hire A Developer
Questions
For strings, you can use string.c_str() which will return you a const char*, which can be treated as an array, example:
string.c_str()
const char* strdata = str.c_str(); for (int i = 0; i < str.length(); ++i) cout << i << strdata[i];