Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

string length in c++

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

int main ()
{
  std::string str ("Test string       ");
  std::cout << "The size of str is " << str.length() << " bytes.
";
  return 0;
}
//The size of str is 18 bytes.
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #string #length
ADD COMMENT
Topic
Name
9+4 =