Translating Java classes into C++
Translating Java classes into C++
Here are the key points:
Declare every method as virtual.
Only allocate objects using new.
Access all objects using pointers.
Use collections of pointers
Define destructors and use delete to get rid of anything allocated using new as there is no garbage collection.
Translating Java classes into C++