Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

length of string 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;
}
 
PREVIOUS NEXT
Tagged: #length #string
ADD COMMENT
Topic
Name
5+1 =