Hmm is there a way for boost::format to function like snprintf. Example char str[64]; std::cout << boost::format("%s") % str;
char str[64];
std::cout << boost::str(boost::format("%s") % str);
--- chun ping wang
Hmm is there a way for boost::format to function like snprintf.
Example
char str[64];
std::cout << boost::format("%s") % str;
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users ___________________________________________________________ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.yahoo.com/
sorry i meant like how to hand rolled my own implemenation .. example...
int my_sprintf(char* s, size_t size, ....)
{
// write to s the formatted value..
// return the total number of characters written.
}
On 7/20/07, Andrej van der Zee
char str[64]; std::cout << boost::str(boost::format("%s") % str);
--- chun ping wang
wrote: Hmm is there a way for boost::format to function like snprintf.
Example
char str[64];
std::cout << boost::format("%s") % str;
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
___________________________________________________________ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.yahoo.com/ _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Andrej van der Zee
-
chun ping wang