A simple c++ question?

I want to transfer a character, say: char number = 1,000,000 into an integer called x, normally I would use atoi or atof, but this is not possible because of the commas in the middle of the number. How would I go about making this char into a integer data type by removing these commas? And is there a general... show more I want to transfer a character, say:
char number = 1,000,000
into an integer called x, normally I would use atoi or atof, but this is not possible because of the commas in the middle of the number. How would I go about making this char into a integer data type by removing these commas?

And is there a general way to remove commas from a number, and put the remaining numbers into an int data type?
3 answers 3