
-----------------------------------
wtd
Sun Feb 05, 2006 7:02 pm

[Tip] Getting used to printf formatters
-----------------------------------
So, you're trying to get used to printing formatted code with printf.  But that means lots of compiling and recompiling, right?  And for the sake of running tiny snippets of code.  What a pain.

There's an easier way.  Install Ruby, and you can use its printf method via the interactive interpreter.

-----------------------------------
Onega
Mon May 08, 2006 12:04 am


-----------------------------------
For C++ programmer, it is recommended to use iostream instead of printf. There are a lot of exploits related to printf function.

-----------------------------------
[Gandalf]
Mon May 08, 2006 12:49 am


-----------------------------------
That should probably be "it is recommended to use iostream instead of stdio"?  
What sort of exploits would you be talking about?

-----------------------------------
Onega
Mon May 08, 2006 3:56 am


-----------------------------------
"There are a lot of exploits related to printf function." I made a mistake that above statement is not true. "Buffer overrun" problem is realted to sprintf. But printf is still an unsafe method, because you may fail to match flags with actual parameters (i.e. type mismatch, less parameters provided)

-----------------------------------
wtd
Mon May 08, 2006 9:57 am


-----------------------------------
This forum covers languages other than C++, and C++'s "iostream" functionality is a lot less widespread than C-style print formatters.
