[Solved] C++ How to fill a char* array of strings with new values using c_str() on top of old ones [duplicate]

I try to copy the string into the array of string literals What you are trying to do isn’t legal C++. char* MapIds[5000] = … should be const char* MapIds[5000] = … and trying to overwrite anything in that array makes your program have undefined behavior. I try to stay away from std::string and instead … Read more