Skill Help: Converting a string into an Integer

S

Swathi Murugan

Guest
Hi,
Can anyone let me know how to convert a string "12345" to an integer 12345 ?

Thanks!
 
Swathi Murugan <sparklingduce@gmail.com> writes:

Hi,
Can anyone let me know how to convert a string "12345" to an integer 12345 ?

See sscanf, evalstring.

Yours,

--
Jean-Marc
 
On 11/25/13 14:28, Jean-Marc Bourguet wrote:
Swathi Murugan <sparklingduce@gmail.com> writes:

Hi,
Can anyone let me know how to convert a string "12345" to an integer 12345 ?

See sscanf, evalstring.

Yours,

Or atoi(). I never like using evalstring(), because if somebody does:

num="(exit)"
evalstring(num)

then interesting things happen...

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top