I am trying to write a program where the user inputs a sentence and the program outputs each word on a separate line. I know I need a loop but I don't know how to set it up?
cout<<" Enter the number which you want to chosse : ";
cin>>chosse;
do {
case 1: cout<< " doing something 1 which you want to do " ;
case 2 : cout<< " doing something 2 .....";
........
default : break;
while ( chosse < 1 || chosse > n );
That sounds great, but this is for a class and we haven't learned about replace functions yet so I wouldn't be able to use one. I like the idea of it though.