
Originally Posted by
mickey
OK!! It is just for fun. But I think your target in your question was another. Is it so? I'm curious too.....
No... I don't think so.
But I don't find fprintf method in string; but if it's used to write on a file as said before it's a cheat...
sprintf not fprintf. You sprintf what you want to printf into a string and then "printf" it (by redirecting) to cout 
Something like:
std::string str;
str.sprintf("Format %s", "xyz");
std::cout << str << std::endl;
std::string str;
str.sprintf("Format %s", "xyz");
std::cout << str << std::endl;
To copy to clipboard, switch view to plain text mode
Just make sure std::string::sprintf really exists.
Bookmarks