April 11th, 2005, 10:37 PM
int to string in C
Say u have int i=90 and char str, where str is an array of chars ( aka string), would u recommend using memset or memccpy (from string.h> to make a string from an integer.
In my program, int can be any random number ( not a particular range of numbers) so u cant necessarily create a lookup table and use strcpy().
please get back asap cos its due this Friday.
April 11th, 2005, 10:57 PM
I would use itoa(...) to convert an integer to a string in C:
April 11th, 2005, 11:05 PM
I would learn how to use google and how to do proper research so I could do my own homework.
"When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
"There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
"Mischief my ass, you are an unethical moron." - chsh
Blog of X