Mar 29, 2016 at 4:24pm UTC
Can anybody tell me, how can I convert string to const char? I want to create a saving and a color changing system in my torpedo game.
Last edited on Mar 29, 2016 at 4:25pm UTC
Mar 29, 2016 at 4:37pm UTC
String? What string? std::string?
A const char?
A char is a very small data-type. A string (of characters) has many chars. How would you compress and store a big number in a small number?
You have to explain more.
Mar 29, 2016 at 4:46pm UTC
I want to convert std::string into a const char in a simple and understandable way.
Mar 29, 2016 at 7:05pm UTC
Thank you! It's working. :D
Mar 30, 2016 at 10:33am UTC
keskiverto's comments still stand: that's not a const char. It's a pointer to a const char . There's a difference, and it's crucially important that you understand what that difference is.