0
Can C++ define arguments
basically what I'm asking is if you can define what you want an argument to be. for example say I want to create a game and for the monster I want the 1st argument to define the monster by melee(m), ranged(r), spellcasting(s). 2nd argument to be respawn time. 3rd to be exp ect..
1 Answer
+ 1
Yes, you define the arguments when you program the constructor for the monster class.
monster(char type, int respawnTime, ...) {
this.setType(type);
this.setTime(respawnTime);
...
}