cpp create string code example
Example 1: declaring strings c++
std::string str = "hello world";
char *str = "hello world";
char str[] = "hello world";
char str[11] = "hello world";
Example 2: c++ write string
#include <iostream>
int main() {
std::cout << "Hello" << std::endl; //endl = end line/new line
// or
printf("hello");
}