Aug 21, 2001 #1 ngen Technical User Mar 18, 2001 5 NL Hi, I wish to convert an integer to char* in C++ (I am using VC++). Like: int i = 10; char *j =... <to convert int to char *> printf("%s\n", j); <- here it will prints out 10. Please help. Thanks.
Hi, I wish to convert an integer to char* in C++ (I am using VC++). Like: int i = 10; char *j =... <to convert int to char *> printf("%s\n", j); <- here it will prints out 10. Please help. Thanks.
Aug 21, 2001 #2 Cagliostro Programmer Sep 13, 2000 4,226 GB int i = 10; char* j = new char[10]; sprintf(j,"number %d",i); the most important is where is underlined. John Fill ivfmd@mail.md Upvote 0 Downvote
int i = 10; char* j = new char[10]; sprintf(j,"number %d",i); the most important is where is underlined. John Fill ivfmd@mail.md