is there a string equivalent of the sprintf function?
i want to do the equivalent of sprintf(temp,"number is: %d",num);
is there a string equivalent of the sprintf function?
i want to do the equivalent of sprintf(temp,"number is: %d",num);
Check your original topic. matsp provided the way to use stringstream.
This has already been answered in http://cboard.cprogramming.com/showthread.php?t=92709
Could someonewith "privileges" remove this duplicate thread.
--
Mats
is that the best way to do it tho? it took up quite a few lines of code. is there another way?
Further replies to the other thread please.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.