Jump to content

  • Log In with Google      Sign In   
  • Create Account


C or C++ I have lost my mind.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
27 replies to this topic

#21 PoesRaven   Members   -  Reputation: 122

Posted 16 January 2000 - 05:42 PM

alot to say
first of all, c++ is more readable and easier to think in
c is not dead however because it is faster
basically, to do c++ you need to know c -- sure you cant use classes and such in c code, but instead you just use more function calls from other headers (stdio with printf instead of iostream with cin/cout)
lastly, you can still use old file code in widows -- i use _open and _close and such -- you can have more files open that way than you can with streams

Sponsor:

#22 jschmidt   Members   -  Reputation: 122

Posted 17 January 2000 - 01:00 PM

C++ is a hybrid language combining structured programming with oop. The C++ structured stuff is the same as C. The only difference is the standard library stuff. And you need a reference book for that stuff anyway. Don''t waste your time sweating over this, just learn C++, get a C reference book, read through it once and put it on your bookshelf.

#23 Staffan   Members   -  Reputation: 122

Posted 19 January 2000 - 06:39 AM

C is _NOT_ dead!

Sure, C++ is great! If you''re doing a big project (yeah gaming programming involves that), alone or not, it''s great for getting a good structure. But then again, lets say you were to write as small console application to convert bitmaps from diffrent bitdetphs...would you do it in C++ with full blown classes and class tempelates and shit? Or in C, straight and clear, and get it done in 10 minutes? Learn both C & C++. I started out in C when i was 14, got a book at the library, wasnt hard i might add. Then learning C++ was a simple task. Another reason of knowing/coding C is that more people know it, actually i think about that 50% if not more of all code done today is pretty straight C. Have an open mind, learn them both! Go for assembly too while you''re at it

#24 DarkMage139   Members   -  Reputation: 294

Posted 22 January 2000 - 09:02 AM

Listen up, everybody!

C++ is great for servers, business apps, and that stuff. But if you plan to go with game programming, you''ll need to learn about C first. For one thing, it''s faster. Second, it''s not as complex as C++, and since game programming is mostly data manipulation, the simpler it is, the less bugs it will have.

I don''t mean that you should throw away C++. I simply mean that if you plan to be a game programmer, you should study C first.

#25 Staffan   Members   -  Reputation: 122

Posted 22 January 2000 - 10:12 AM

darkmage, most of todays cutting edge games are done in C++. why you might ask yourself? its more structured and of course, the encapsulation is great! most things can be done in C++ without any significant loss of speed, but then again, not everything. thats why you program those critical but even so essential parts in assembly.

Edited by - Staffan on 1/22/00 4:14:06 PM

#26 UraniumRod   Members   -  Reputation: 122

Posted 22 January 2000 - 10:48 AM

Actually DarkMage139, C++ helps in preventing bugs in the first place. C code is much more prone to bugs.

#27 Mithrandir   Members   -  Reputation: 607

Posted 24 January 2000 - 02:06 AM

C++ is only slower than C is you use a bad compiler, or if you don''t know what the hell you''re doing.

#28 dog135   Members   -  Reputation: 122

Posted 26 January 2000 - 12:43 PM

I agree, if you use the same compiler for C or C++, it'll compile the same either way.

For games I don't see why you wouldn't want to use C++. With OOP, you can have each character a class and just tell a character "moveTo(x,y)" and your class takes care of how the animation should work for the character to move to that location. Anytime you deal with virtual objects, you'll almost always benefit from using OOP.

Besides, most advancements in programing deal with C++, not C. Almost all the newest compilers can compile C++, and if you ever decide to learn Java, you'll already have an idea on how to structure your programs.

BTW: I don't believe that C++ programs should be totaly object orientated. All the programs I've written have been pretty much procedural. I use OOP as either a database, or to represent a virtual object. I've seen many people who use OOP for all their programs, even those that would be much smaller and faster if written procedurally.

A good example of different ways of programming in C++ can be found at:

http://www.ionet.net/~timtroyr/funhouse/beer/beer_a_c.html#cpp

(scroll down a ways and you'll see the C version of the program)


E:cb woof!

Edited by - dog135 on 1/26/00 6:46:31 PM




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS