Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [Tip] Getting used to printf formatters
Index -> Programming, C++ -> C++ Tutorials
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Sun Feb 05, 2006 7:02 pm   Post subject: [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.
Sponsor
Sponsor
Sponsor
sponsor
Onega




PostPosted: Mon May 08, 2006 12:04 am   Post subject: (No subject)

For C++ programmer, it is recommended to use iostream instead of printf. There are a lot of exploits related to printf function.
[Gandalf]




PostPosted: Mon May 08, 2006 12:49 am   Post subject: (No subject)

That should probably be "it is recommended to use iostream instead of stdio"?
What sort of exploits would you be talking about?
Onega




PostPosted: Mon May 08, 2006 3:56 am   Post subject: (No subject)

"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




PostPosted: Mon May 08, 2006 9:57 am   Post subject: (No subject)

This forum covers languages other than C++, and C++'s "iostream" functionality is a lot less widespread than C-style print formatters.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: