Thu Nov 13, 2008 7:28 pm
#include <iostream>
#include <string> // include for C++ standard string class
using namespace std;
int main()
{
string stringA = "C++";
string stringB = "Is Cool";
cout << "Length of stringA = " << stringA.length() << endl;
cout << "Length of stringB = " << stringB.length() << endl;
return 0;
}
/*
Length of stringA = 3
Length of stringB = 7
*/
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.