I want to enter a string with spaces and want the program to tell me what is size of the entire thing, not just up to the first space.
Code:
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main()
{
string alpha;
int alpha_len;
cout <<"Enter String with a space in between" <<endl;
cin>> alpha;
alpha_len = alpha.size();
cout<<"String lenght is "<<alpha_len<<endl;
system("PAUSE");
return 0;
}