La aceasta problema trebuie sa folosesti corect functia strtok....eu am luat 100p . Succes!
#include <iostream>
#include <cstring>
using namespace std;
char s[1000],sep[]=" ", *p, c[50];
int main()
{
cin.getline(s,1000);
p=strtok(s,sep);
while(p!=NULL)
{
strcpy(c,p);
cout<<c<<" ";
p=strtok(NULL,sep);
}
return 0;
}