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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP!!!! from int to char*

Status
Not open for further replies.

delci

Instructor
Jul 13, 2005
4
GR
Hi,
I have the following:
char *argv[2];

and I somehow want to have argv[1]=int;
i tried to use atoi but it seems that it doesn't exist (I have included the stdlib.h).
I use UNIX.
Is there another way?

Please help...
delci
 
> i tried to use atoi but it seems that it doesn't exist (I have included the stdlib.h).
Try using strtol() or sscanf() then (the former is preferred)


--
 
What evidence do you have that "atoi" doesn't exist? What error messages do you get?
What flavour and version of Unix are you using?



Trojan.
 
If you're on a *nix box, type "man atoi" and take a look at what files do you need to include.

Cheers,

Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top