Thursday, April 28, 2011

Your Questions About Sprintf

Maria asks…How do i clear a string in C/C++ after using a sprintf() into it?what's the easiest way to make that string null again?admin answers:In C++, if you are using a std::string object, you may simply initialize that to a empty string.

Std::string str = "something";

// your sprintf line

str = "";


Hope this helps!!!

Regards
SAMDonna asks…C++: How to make the sprintf built-in function not return a value?This is my simple program for generation random numbers:

#include
#include

HTC Droid Incredible 2

No comments:

Post a Comment