Hey guys, so im making a game in console and i wanna know if using voids its the best option for making different game situations.
Example:
Im making a game about evolution.
you begin with a planet and then you evolve etc etc..
So lets say, if i create this:
void MeteorShower(){
int Metnumber = 300;
int rand();
int Metsize;
if (rand > 100){
std::cout << "A Meteor Shower is close! Please do Something" << std::endl;
std::cout << "Actions:" << std::endl;
std::cout << "1 - Option 1" << std::endl;
std::cout << "2 - Option 2" << std::endl;
std::cout << "3 - Option 3" << std::endl;
}
}
and its not the end .. but u see the point.
Well the question is should i use voids? or how can i make this "situations"?
If your function has nothing to return, use void. There's nothing wrong with that.