c++ - Simple way of returning the length of the string to output -


i writing program prints out user-entered string , length. able part:

 #include <iostream>  #include <string>  using namespace std;  int main()  {      string x;      getline(cin, x);      cout << "you entered: " << x << "string length/size is: "<<  /*  comes here ? */  <<endl;  } 

rest of process remains incomprehensible.

there's function belongs string object, in case x.length() return length of string.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -