If a string\'s length is determined at compile-time, how can I properly initialize it?
#include int length = 3; string word[length]; //invalid
You are probably looking for:
string word(3, ' ');