Answers for "value of string in c++"

C++
19

string in cpp

// Include the string library
#include <string>

// Create a string variable
string greeting = "Hello";
Posted by: Guest on October-01-2020
4

how can make string value in cpp

#include <string>
string hello= "hello you thre :)";
Posted by: Guest on June-07-2020
0

none

// string::operator[]
#include <iostream>
#include <string>

int main ()
{
  std::string str ("Test string");
  for (int i=0; i<str.length(); ++i)
  {
    std::cout << str[i];
  }
  return 0;
}
Posted by: Guest on January-01-1970

Browse Popular Code Answers by Language