I am creating a basic search function for an entry level programming course and ran across this problem.
string query;
cout<<"Enter a query: ";
cin>>query;
cout<<query<<endl; // debug line
find(query); // calls to another function
- If I input:
Wellington, Florida, I get output:Wellington, - If I input:
Miami, Florida, I get outputMiami,
It seems like cin ignores everything after the spaces and makes my function call mess up. Is there anyway around this ?