Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Converting int to char*
Name: cernov Date: May 24, 2004 at 13:07:52 Pacific OS: Fedora core 1 CPU/Ram: AMD 750Mhz 128 RAM
Comment:
Is there a function who converts any integer to a string (char *). Remember I can't use itoa() because it's a unix-like system
Name: tommycoolman Date: May 24, 2004 at 13:49:10 Pacific
Reply:
You can use sprintf(). It's like printf() except it prints to a string instead of stdout. sprintf() works exactly like printf(), except the first parameter is a pointer to a string.
Summary: I have a program which im writing that will count up ip addresses starting from 1.0.0.1. Each octet of the ip address is assigned as an int. ie int oct1, int oct2 I then want to assign these 4 values ...
Summary: BBs approach is correct but is lacking in explanation. Basically, BB is saying to take your integer and add it to the letter 'A' (ignore the -1 for now). This works because in C/C++, a character can b...
Summary: did anyone know how to convert void* in VC++ to char in C#, because I have a unmanaged dll and want to use in C#. I know C# don't have the pointer. ...