atoi(dob.c_str())
That's one way to do it. I would do it like this:
istringstream convert(dob);
int intDob =0;
convert >> intDob
And voila: string dob is now saved as an int in intDob!
Nick Evan
Not a Llama
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
Here's a link to the istringstream class
For your problem I'd probably use get() or ignore().
Nick Evan
Not a Llama
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403