How can I correctly initialise a string if its length is specified at build time?
#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';
...in order for me to accomplish anything like this?
I'm doing this because I have a loop that copies characters from specific parts of another string into a new string.