read multiple integers from string each in integer form

Nov 17, 2012 at 10:59pm
hi
i am trying to read numbers from a string.
whatever i read i want it in the form of integers.
i tried using getline function to take it as an integer.
Also tried strtok but failing somewhere while integrating in the final code.
Please suggest different way to do this.
I read another post on strtol can u pls throw some light on strtol or anyother way to do this?

Pranav
Nov 17, 2012 at 11:31pm
you can use atoi(...);
Nov 17, 2012 at 11:35pm
it doesnt work.. and i also want help for switch code i wan the menu to be pronted and functions to be called accordingly repeatedly till i press q to exit
Nov 18, 2012 at 2:33am
closed account (D80DSL3A)
content removed due to reply timeout.
Last edited on Nov 26, 2012 at 9:43pm
Topic archived. No new replies allowed.