Answers for "C++ length of sting"

C++
36

C++ length of sting

// string::length
#include <iostream>
#include <string>

int main ()
{
  std::string str ("Test string");
  std::cout << "The size of str is " << str.length() << " bytes.\n";
  return 0;
}
Posted by: Guest on November-18-2019

Browse Popular Code Answers by Language