Mar 30, 2013 at 8:09am UTC
Hi guys,
I wonder if there is a way to convert string to int without atoi and stringstream.
Am I going to convert C-string to an array of int ?
Last edited on Mar 31, 2013 at 12:35am UTC
Mar 30, 2013 at 8:12am UTC
If atoi does the task then why do you wonder? It is obvious that atoi uses some way to convert a string to an integer that you can reproduce.
Mar 30, 2013 at 8:14pm UTC
I wonder if I can write a program and convert it by myself.
Mar 30, 2013 at 9:33pm UTC
http://www.asciitable.com/ use ascii but don't see why you would reinvent the wheel unless it is for a learning experience. Stringstream is probably the best way to go about it.
Last edited on Mar 30, 2013 at 9:34pm UTC