C Board  

Go Back   C Board > General Programming Boards > FAQ Board

 
 
LinkBack Thread Tools Display Modes
Old 12-02-2001, 04:02 PM   #1
Unregistered
Guest
 
Posts: n/a
how do i convert a string to an integer??

please help.
i need to convert a string (with a numeric value) to an integer. how do i do that in c?
thanks a lot.
 
Old 12-02-2001, 05:03 PM   #2
Code Goddess
 
Prelude's Avatar
 
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

Forum Jump

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


All times are GMT -6. The time now is 11:55 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22