Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string to integer conversion 1

Status
Not open for further replies.

MvanH

Technical User
May 15, 2001
19
0
0
NL
He people,

I feel really stupid for asking this,
But How do I convert a number in a string into a integer?

I read a line from a file, 'value1 = 1000'

By the use of file.readstring(string_with_value);

How do I get the value that is now in the CString string_with_value, to a usable 'int value1'?

Thanks,

Martini
 
There are also sscanf like functions.
for example
char* x="1234";
int xx;
sscanf(x,"%d",&xx); John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top