Check out example codes for "what is c_str()". It will help you in understanding the concepts better.
Code Example 1
The basic_string::c_str() is a builtin function in C++ which returns a pointer to an array that contains a null-terminated sequence of characters representing the current value of the basic_string object const CharT* c_str() const
Learn ReactJs, React Native from akashmittal.com