![]() |
| | #1 |
| Guest
Posts: n/a
| how do i convert a string to an integer?? i need to convert a string (with a numeric value) to an integer. how do i do that in c? thanks a lot. |
| | #2 |
| Code Goddess Join Date: Sep 2001
Posts: 9,661
| Code: int i;
char * string = "1024";
i = atoi(string);
printf("%d", i);
__________________ My best code is written with the delete key. |
| Prelude is offline |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Link List math | t014y | C Programming | 17 | 02-20-2009 06:55 PM |
| String Class | BKurosawa | C++ Programming | 117 | 08-09-2007 01:02 AM |
| convert from integer to string | peter_hii | C++ Programming | 2 | 04-06-2006 09:28 AM |
| lvp string... | Magma | C++ Programming | 4 | 02-27-2003 12:03 AM |
| please help ... to convert date to string | mel | C Programming | 1 | 06-12-2002 10:26 AM |