You must always store 300 characters in string .
As I understand it, memory is allocated dynamically when assigned to an example:
string ex = "Example"; I need to explicitly assign each character a value,
ex.at(100) = '2'; but when executing the code there will be an error, because memory was not allocated, is it possible to specify the size of a string explicitly, as in a character array?
This option is not very
for(int i=0;i<300;i++) ex += " ";