In the code below, I tried to let the user input text, and it would output the first word. However, whenever I try the program to input the text, it doesn't output anything.
using namespace std;
for(string winput; cin>>winput; )
cout << words;
Last edited on