I have just started reading C++ and found c++ having rich functions for string manipulation which C does not have. I am reading these function and came across c_str()<
c_str() converts a C++ string into a C-style string which is essentially a null terminated array of bytes. You use it when you want to pass a C++ string into a function that expects a C-style string (e.g. a lot of the Win32 API, POSIX style functions, etc).