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