Classes

Hello experts! :) Our teacher told us to make something like:

-->Arrow Release
----> Ranged -->
-->Flamethrower
Attacks-->
-->Punch
----> Melee -->
-->Kick

As you can see, he wants us to make seven classes which consist of the main idea (Attacks) then split attacks into two classes (Ranged and Melee) then split each of them into two more classes (Ranged: Arrow Release and Flamethrower, Melee: Punch and Kick) which total seven classes in all. Can someone please help me make these seven classes into one single .cpp file? Cause I tried searching youtube videos and cplusplus tutorial yet I still can't grasp it for some reason...

Can someone please help me make these seven classes into one single .cpp file

Hiya,

It is possible, but I'm not sure why you'd want to do this. You'd normally have one .cpp file (and it's corresponding .h file) for each class.

Topic archived. No new replies allowed.