Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » General Discussions » General Discussion » I Learn Some Basic C++!
Re: I Learn Some Basic C++! [message #392448 is a reply to message #391886] Fri, 26 June 2009 19:18 Go to previous messageGo to previous message
HTT-Bird is currently offline  HTT-Bird
Messages: 11
Registered: June 2009
Karma:
Recruit
SSnipe: Grab "Accelerated C++" by Andrew Koenig and Barbara Moo. That should get you much further than anything I can post in this thread. Once you've worked through that book, you will have a good enough grasp of the language to start playing with Rene-coding.

@SK: Go read "The String Formatters of Manor Farm" by Herb Sutter. That, and we're getting varadic templates in C++0x, so expect to see something >>>> printf soon. Hint:
#include <cstdio>
int main()
{
  const char* bad = "this will blow up";
  int very = 42;
  std::printf("%s%d\n", very, bad);
  return 0;
} 


With a varadic-template-enabled version of printf, you'd get a compiler error saying "can't convert int to const char*" not Undefined Behavior (translation: crash bang boom) at runtime.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Your daily commute to work!
Next Topic: Virus
Goto Forum:
  


Current Time: Thu Nov 28 21:15:36 MST 2024

Total time taken to generate the page: 0.01028 seconds