+ 2
Can we emulate OOP in C?
How many ways are there in this case?
3 Réponses
+ 1
C and C++ are both low level language, so you can do the same things in both. Just repeat manually operations, that c++ compiler does, in c program. It is not a question about the possibility, but question about how much efforts it is required.
For example you have to write a virtual table for your classes and call methods through the table. You have to call constructor and destructor each time it is required.
+ 2
Yes, you can... I don't know what you mean with ways...
See more:
https://stackoverflow.com/questions/351733/can-you-write-object-oriented-code-in-c
+ 2
Thanks for the help of both. They were good answers for me! Thanks for help me!