printf for C++ strings
1
Name:
Anonymous
2007-11-16 9:41
Hello /prog/
Is there a good printf/sprintf/vsprintf implementation for C++ strings available anywhere?
2
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()
3
Name:
Anonymous
2007-11-16 10:06
.... GO READ A FUCKING BOOK IDIOT
4
Name:
Anonymous
2007-11-16 10:06
5
Name:
Anonymous
2007-11-16 10:06
C++? lol use lisp
6
Name:
Anonymous
2007-11-16 10:07
OP is a troll, ignore this thread
7
Name:
Anonymous
2007-11-16 10:07
8
Name:
Anonymous
2007-11-16 10:07
fuck off
9
Name:
Anonymous
2007-11-16 10:07
my other car is a cdr
10
Name:
Anonymous
2007-11-16 10:13
>>1
Yes, it is called
std::cout
11
Name:
Anonymous
2007-11-16 11:43
12
Name:
Anonymous
2007-11-16 11:44
13
Name:
Anonymous
2007-11-16 12:11
14
Name:
Anonymous
2007-11-16 13:16
Sepples == AIDS.
15
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.
16
Name:
Anonymous
2007-11-16 14:08
17
Name:
Anonymous
2007-11-16 14:24
18
Name:
Anonymous
2007-11-16 14:27
>>15
>>16 is right, but C is also win.
19
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?
20
Name:
Anonymous
2007-11-16 15:09
#include <sstream>
21
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.
22
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.
23
Name:
Anonymous
2007-11-19 11:26
Legacy code, dudes. It's more important than you think.
24
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.
25
Name:
Anonymous
2007-11-19 12:40
Passing objects on the stack, as varargs? That sounds... painful.
26
Name:
Anonymous
2007-11-21 0:18
>>25
DON'T LIKE LEAVING THE HAPPY LAND OF TYPE-SAFETY, EH?
27
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.
28
Name:
Anonymous
2010-11-27 4:30