hello shouldn't the code below return 11 for "hello there", it returns me the size of the first word i.e 5 for hello
well if i take the input in the code itself as string a = "hello there". i get 11.Code:#include<iostream> #include <string> using namespace std; int main(){ string a; cin>>a; cout<<a.size(); }
i suspect its some thing related to input stream buffer or something. I am naive at this.