piyush_4love_4ever wrote: > can we chage a char type string into a int type variable. > pls show how is it possible ? > suppose i define > char *str; > gets(str) ; // suppose we get two int in str > now i want to store these two int into a single int type variable. > how is it possible??
You are going to get a lot of flak for using gets(). To answer your question: atoi() (if your compiler supports it) is the easiest method or strtol() (much more portable). -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
