Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

printf for C++ strings

Name: Anonymous 2007-11-16 9:41

Hello /prog/

Is there a good printf/sprintf/vsprintf implementation for C++ strings available anywhere?

Name: Anonymous 2007-11-16 9:44

I mean, sprintf and vsprintf output to a C++ string, and all of printf/sprintf/vsprintf accept C++ strings for the %s parameter without needing a .c_str()

Name: Anonymous 2007-11-16 10:06

.... GO READ A FUCKING BOOK IDIOT

Name: Anonymous 2007-11-16 10:06

>>1
read SICP.

Name: Anonymous 2007-11-16 10:06

C++? lol use lisp

Name: Anonymous 2007-11-16 10:07

OP is a troll, ignore this thread

Name: Anonymous 2007-11-16 10:07

>>4
HURR DURR SICP LOL??

Name: Anonymous 2007-11-16 10:07

fuck off

Name: Anonymous 2007-11-16 10:07

my other car is a cdr

Name: Anonymous 2007-11-16 10:13

>>1
Yes, it is called std::cout

Name: Anonymous 2007-11-16 11:43

>>10
NO, that sucks

Name: Anonymous 2007-11-16 11:44

>>11
yiuo sucks

Name: Anonymous 2007-11-16 12:11

>>1-12
C++ sucks

Name: Anonymous 2007-11-16 13:16

Sepples == AIDS.

Name: Anonymous 2007-11-16 13:33

>>14
Holy fucking crap;

you used a Lisp slang name for C++ yet you used the equality predicate of serious languages. What.

Name: Anonymous 2007-11-16 14:08

>>15
Haskell.

Name: Anonymous 2007-11-16 14:24

>>16
hurrrrrrrrrrrrr

Name: Anonymous 2007-11-16 14:27

>>15
>>16 is right, but C is also win.

Name: Anonymous 2007-11-16 14:32

>>1
Why would you want to use unsafe, outdated rubbish API from the 80's? Is there something wrong with you? Does you family have a history of mental illness?

Name: Anonymous 2007-11-16 15:09

#include <sstream>

Name: Anonymous 2007-11-16 22:29

http://boost.org/libs/format/doc/format.html

>>2

If you're writing C++, write C++. vsprintf, sprintf, and printf are _legacy_ functions, not recommended for use in new code.

Name: Anonymous 2007-11-19 10:47

>>18 and similars:
15 years old kids who just learnt C and think it's such a huge achievement they need to praise it to show they can do C.

Name: Anonymous 2007-11-19 11:26

Legacy code, dudes. It's more important than you think.

Name: Anonymous 2007-11-19 11:40

Look at the _output_l function in C:\Program Files\Microsoft Visual Studio 8\VC\crt\src\output.c, and adapt that to C++ strings.

Name: Anonymous 2007-11-19 12:40

Passing objects on the stack, as varargs? That sounds... painful.

Name: Anonymous 2007-11-21 0:18

>>25
DON'T LIKE LEAVING THE HAPPY LAND OF TYPE-SAFETY, EH?

Name: Anonymous 2009-03-06 12:23

The few syntax there is totally sucks   The power of   altgr I can   yank one changed   line yy and.

Name: Anonymous 2010-11-27 4:30

Don't change these.
Name: Email:
Entire Thread Thread List