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.
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.
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.
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.
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.