   What exactly are some differences between C and C++
  I have heard that C++ is C but with Object Orientation but are the two languages syntactically the same? I know C has some different commands: cout -vs- printf but exactly how different are the two languages. I bought the "Tricks of the Windows Game Programming Gurus" and it says the examples are written in C with C++ scattered about. My language of choice is C++. I haven''t learned the OO of the language yet, but I will know all the good stuff about classes, polymorphism, and inheritance by the end of this school semester. I''m trying to wait and read the LaMothe book until I''m finished with the class but curiosity is killing the cat. I guess what I''m really asking here is will I have a hard time going through the code examples in the book without a C background? What are some differences between C and C++ Win32 programming? 
  Well, you hit on the one important difference: Object-Oriented vs Procedural.  C++ was designed with OO in mind.  C was designed with procedural code in mind.  cout and printf demonstrate this nicely.  They are not commands, by the way.  cout is a class.  You invoke the methods of the class to accomplish output.  printf is a procedure.  You call the procedure to accomplish output.  Is there any real difference to the computer?  Nope, just two different ways of looking at the same problem.And yes the syntax of the two are very similar.  If you know the basic syntax of either one, you should be able to follow the examples just fine.   [edited by - CodeMunkie on February 9, 2004 11:30:39 AM];  There is a world of a difference between a properly written C++ program and it's equivalent in classic C. In fact, the C++ code structure should look totally alien to a C programmer (syntax is the only similarity). The only way to learn C++ well is by following good examples. Read some books on design patterns, object oriented design, etc and you will be enlightened.[Edit] As to LaMothe's Tricks, it's invaluable as a game programming primer, however his code is not C++ at all. In fact, his style is down-right ugly, but I let it slide because it's not a book on C++ code design/OOP (if it were, the book would be 5 times the size probably). Once you know what makes a game tick, it's up to you to make it clean/extensible, and C++ allows just that.   [edited by - fallenang3l on February 9, 2004 1:41:42 PM];  The main difference between the two languages is that C++ is supports ( i would say an obsolete form of) object orientation.if you are interested in programming games, you need to not bother with C, go with c++. C++ and C, while similar, are different languages. A book on learn C++ will not require any knowledge of C, and if your lucky, it will actually teach c++, and not c with ++.-Ya andre talks about how its all mostly C++, and how the C programmers might pull their hair out... LOL. as a C++ programmer, i personally felt like pulling my hair out at some points. at the same time im sure many c programmers were scratching their heads, saying, is this c++? [edited by - Evilcrap on February 9, 2004 6:41:16 PM];   deleted what I typed since it wasn''t relevant.No, if you have difficulty going through the code examples, it''s probably because you''re having difficulty with the material. Alot of the win32 and directx code is... obtuse [to me at least] and difficult to read; far more than trying to read C code if you know C++. Plus some of LaMothe''s examples don''t seem to work right.win32 programming is win32 programming. The "scattered C++" described in the intro is largely the win32 controls and the such.;  C is a subset of C++ for the most part.  That is, most C programs are C++ programs also, but NOT vice versa.  But there are some differences you should be aware of.To summerize from Schildt's "C++: The Complete Reference" (3rd ed)In C++, local variables can be declared anywhere whithin a block.  In C, they must be declared at the start of a block.It's "int foo(void)" in C, and "int foo()" in C++.C++ functions must be prototyped.  This is an option in C.Characters constants are automatically elevated to an integer in C.  In C++ they are not.It is legal to declare a global variable several times in C.  It is not in C++.In C at least the first 31 characters of a identifier significant. In C++ all characters are significant.In C you can call main() from your program.  In C++ you can't.You can't take the adress of a register variable in C.  You can in C++.If no type is specified in C it will default to an integer.  It won't in C++Hope that helps a little.   [edited by - Rayno on February 10, 2004 1:34:50 AM];  C++ reserved words:and  and_eq  asmautobitand   bitorbool break   case    catch    charclasscomplconst   const_cast   continue default  deletedo   double  dynamic_cast elseenumexplicitexport    extern  false   float    for friendgoto if inline  int longmutablenamespace newnotnot_eq   operator  oror_eqprivate protected    public   register reinterpret_castreturn    short   signed  sizeof   static   static_caststruct    switch  templatethisthrow    truetry  typedef typeid  typename union    unsignedusingvirtual void    volatile wchar_t  whilexor  xor_eq  Reserved words in bold are C++-only. Studying their use is a good place to start looking for differences between C and C++. enum, extern, static, struct and union also take additional or modified meaning in C++. 