With
str
declared
inside the body of your
for
loop, when the loop exits you have nothing to show for it! Wouldn't something like this get you what you want?
string Ascii7(128, '\0');
for (int i = 1; i < 128; ++i)
{
Ascii7[i] = static_cast<char>(i);
}