Hy All,
check this code, it might help you,
but its is recommended that you try yourself :(
/////////////////////////////////////////////////////////////
char input[50];
cout << "Enter A sentence: ";
cin.getline(input, 50);
for ( int i= 0; i< strlen(input); i++)
{
if (input[i]=='\x20' || i==0) // x20 is hex equavalent of space key
{ if (i==0)
{
cout << input[i];
cout << " ";
}
else
{
cout << input[i+1];
cout << " ";
}
}
}
///////////////////////////////////////////////////////////////////////
Regards,
Asad Abbas
Pakistan
[Non-text portions of this message have been removed]