So it turns out there is a std::string->c_str function. Note: I’m pretty sure this char[] will be deleted when the std::string is deleted…
Converting a C++ std::string to char*
Reply
So it turns out there is a std::string->c_str function. Note: I’m pretty sure this char[] will be deleted when the std::string is deleted…
The file function parses a text file into an array, and the file_get_contents function returns a text file as a string.
I’m working through Zed Shaw’s Learn Python The Hard Way, and I’m up to exercise 5. Doing the extra credit 3 involved searching online for Python format strings, and I found that there is the old way, which is presumably what Shaw wanted me to find, and also the new way in which a new scheme for string formatting is provided.