If a string's length is determined at compile-time, how can I properly initialize it?
#include <string>
int length = 3;
string word[length]; //invalid syntax, but doing `string word = " "` will work
word[0] = 'a';
word[1] = 'b';
word[2] = 'c';
...so that i can do something like this?
Example: http://ideone.com/FlniGm
My purpose for doing this is because I have a loop to copy characters from certain areas of another string into a new string.