Gaming in c

This is a discussion on Gaming in c within the C Programming forums, part of the General Programming Boards category; How can you make C an OO language? I mean it doesn't even have objects or methods or stuff like ...

  1. #16
    Registered User
    Join Date
    Jan 2009
    Posts
    103
    How can you make C an OO language? I mean it doesn't even have objects or methods or stuff like that. Atleast, that's what I think.

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,020
    It does not.
    Using function pointers and structs, it may be possible to emulate classes in C, but it is in no way flexible nor necessarily fast (it would practically be like very function was a virtual function).
    Of course, it also has extra overhead, such as initializing those function pointer and so on.
    So, do not try to make C an OO language, is usually the lesson. It wasn't designed for it and it probably never will be.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #18
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    With a great deal of work, you can make C into just about anything you want. Of course, it wouldn't be worth it.

    If you were smart enough to do that, you'd be smart enough NOT to do that, and just use C++, instead.

  4. #19
    Registered User
    Join Date
    Jan 2009
    Posts
    103
    I am not a experienced programmer by any means, but I suggest that if you are not into like big time games then just use things like java cause they're a whole lot faster and more portable.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. My view on the gaming world
    By swgh in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-25-2008, 10:41 AM
  2. What software is needed to write internet based gaming programs
    By grumpomatic in forum Game Programming
    Replies: 8
    Last Post: 11-26-2005, 10:49 PM
  3. Retro gaming purpose PC
    By Shadow in forum Tech Board
    Replies: 1
    Last Post: 11-08-2003, 06:09 PM
  4. Online Gaming
    By dP munky in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 04-05-2003, 03:51 PM
  5. online gaming places
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 02-20-2002, 12:26 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21