how to use string function in c++ code example
Example 1: c++ write string
#include <iostream>
int main() {
std::cout << "Hello" << std::endl; //endl = end line/new line
// or
printf("hello");
}
Example 2: how to print string data type in c++
printf("%s\n",someString.c_str());