Convert string to char* in C++
In this article, we will discuss different ways to convert a string to char* in C++. Table Of Contents Method 1: Using string::c_str() function Method 2: Using string::data() function Method 3: Using [] operator Method 4: Using STL Algorithm copy() Summary Method 1: Using string::c_str() function In C++, the string class provides a member function […]
Convert string to char* in C++ Read More »