+ 4
How do you implement a class in c??
3 odpowiedzi
+ 8
AFAIK, this is impossible in C. The closest thing to a class that you can do is using struct.
https://www.sololearn.com/learn/C/2942/?ref=app
https://www.sololearn.com/learn/C/2943/?ref=app
You can also check this thread:
https://www.sololearn.com/discuss/1627377/?ref=app
+ 2
if you are writing just in C, which is not an object-oriented language per se. It can done. The first versions of C++ and objective C used preprocessors followed by a c compiler, such as gcc, but now most objected oriented programming languages have their owncompilers.
+ 1
it is not possible in C, the concept of class is introduced in c++ which is extended part of c. instead you can try for structure