so basically i am doing opengl text editor, text field is a std::vector<std::string> where each index is a line.
now what i want to know is, can i modify the content without overwriting the data like: (i mean since std::string is changeable, will change in some Strings, affest the whole vector that mean if lets say i add some string to it, will it be in Strings or in Strings[i+1], i dont know how to ask that, so maybe in other words: is it safe to update that or do i have to recreate whole std::vector<std::string>
(basically i want to add some text to the string itself)
std::vector<std::string> Strings;//divide string into two sections
AnsiString prefix = stddelete(Strings[memo_line], memo_pos, 100000);
AnsiString suffix = stddelete(Strings[memo_line], 0, memo_pos);
Strings[memo_line] = prefix + keys[i].key_char + suffix; <-- here
[spoiler]
inline AnsiString stddelete(AnsiString str, int pos, int len) //this is for std::string only because i will call only Pos()-1 from it
{
AnsiString s = str;
s.erase(pos, len);
return s;
}
[/spoiler]