hey all,
new to the forum, hope you can help.
Can anyone tell me why the following code doesn't work:
I'm trying to assign a string to the second element of a string array.Code:#include <iostream> #include <string> using namespace std; int main() { string aName[20]; int index; index=1; aName[index] = "whatever"; return 0; }
thanks