It's not clear what point you're making or what question you're asking. If you're wanting a critique, keep the following in mind:
#1. Be very careful about using system(). It's very non-portable, and you probably haven't addressed that issue in your code.
#2. You said something about trying to figure out why classes are helpful. This is not a very good example. Most of the time they're very much used as variables, in addition to collections of functions. Here the program technically makes variables out of them, but they're just wrappers around the functionality. You'll see the benefit of classes a whole lot more when you start using them a lot to model nouns in your program, not simply verbs.
#3. You don't really have to make a variable of either class until the last second in this case.
Code:
if (number == 1)
{
hell h1;
h1.hot();
}
In other C-style languages, you can do stuff like:
Code:
if (number == 1)
{
new hell().hot();
}
or:
Code:
if (number == 1)
{
hell.hot(); // requires that the function be shared/static, which would be a good idea in this case
}
I don't remember if C++ has static ("shared" in some languages) functions or if you can use syntax like:
but look into it. At the very least, since you aren't doing anything with the classes except in the if-else statement blocks, you can (and should for space and clarity) hold off on creating those variables until the last second, as in the first example. Which vaguely leads into the next point:
#4. Be more mindful of scope. In the last point, a lot of what what was being discussed was implicitly a matter of you giving those variables a broader scope than is relevant. But another thing is that you have a variable called "number" in main(), one called "number2" in hell, and one called "number3" in heaven. This is unnecessary. Their scopes don't overlap at all in this case, so you can (and should for clarity/neatness) just call them all "number".
You're getting there. Still look into these points though for future coding.