say I have this code.

Code:
#include <iostream.h>
#include <conio.h>
#include <cstring.h>

main()
{

    string input;

    cin>>input;
}
im writing to a database so if someone inputs a space, it will get screwed up.

This is what i people usually will input:

SMITH,JOHN << lastname comma firstname

If they input:

SMITH, JOHN << lastname comma space firstname

The question is, can i delete the space from the input, so i have only the first example. All code i do needs to be in cstring.h. Any examples is appreciated.