gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

C/C++ > classes in c/c++?

#3755 - jenswa - Fri Mar 07, 2003 8:23 pm

In java, your program is most likely build up from classes.
What is (sort of) the equilevant of those classes in c/c++?

Since they might be handy in a rpg game, where classes
like player and enemy, but also items, etc are very handy,
so i don't need to store the variables 'loose' in the game,
but neat in the player class, if they belong there.

thnx

Jenswa
_________________
It seems this wasn't lost after all.

#3756 - Vortex - Fri Mar 07, 2003 8:30 pm

The C++ equivalent of Java class is a class.

The equivalent of Java classes in C is structures and functions operating on these structures.