Programming This forum is for all programming questions. Join our community today! For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. The time now is Having a problem logging in?

Uploader: Fetaxe
Date Added: 2 February 2013
File Size: 7.96 Mb
Operating Systems: Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X
Downloads: 97393
Price: Free* [*Free Regsitration Required]

Hello, Even the strtol function doesnt help.

Hope this helps some. All times linu GMT You can use wcstol to convert from wide strings to integer values. This book contains many real life examples derived from the author’s experience as a Linux system and network administrator, trainer and consultant.

Originally Posted by tronayne Yup, is the maximum size of an integer; you’ll need to use a long instead.

atoi – C++ Reference

Generally it is to your advantage to use strtolcasting the result to linjx int if necessary. Please visit this page to clear all LQ-related cookies. Post as a guest Name. The question does not have to be directly related to Linux and any language is fair game.

Stack Overflow works best with JavaScript enabled. Problem with atoi in pthreads. Open Source Consulting Domain Registration. The reason being that Linuxx uses utf-8 as the standard encoding.

C library function – atoi()

I did a search bash function but it get less results then find. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

The time now is Originally Posted by harishisnow. Reed Copsey k 57 Wouldn’t you just convert to UTF-8?

Ascii digits and utf-8 digits have the same byte representation, so that atoi works both on ascii and utf-8 strings. Find More Posts by johnsfine. Join our community today! Originally Posted by harishisnow I am using: Find More Posts by harishisnow.

Is there a c atoi equivalent for wide chars on Linux? If you need to reset your password, click here. Having a problem logging in? You may wish to use the strtol function there is an example of using it in the man page.

atoi.3p – Linux manual page

Generally it is to your advantage to use strtolcasting the result to an int if necessary; e. Registration is quick, simple and absolutely free. Last edited by harishisnow; at Thanks everyone for the help. Sign up using Facebook.

Sign up using Email and Password.