Okay -- you have some weird ideas of what classes are, which is probably why you're having this trouble. These classes make no sense, and therefore the overall structure is rather flawed.
Classes represent a
"thing". You can create "objects" of classes. These objects represent a single instance of that thing.
For example here's a very simple class:
1 2 3 4 5
|
class Person
{
public:
int age;
};
|
You can make "objects" of this class. For example:
1 2 3
|
Person bob; bob.age = 20;
Person sue; sue.age = 19;
Person jeff; jeff.age = 28;
|
bob, sue, and jeff are all "objects". Each one of them has their own age. bob can have a different age from sue, etc.
Now, you can't just access 'age' from Person. Something like this doesn't make any sense. Note that this is exactly what you are trying to do with your Initialize class, just rephrased:
1 2 3 4 5 6 7 8 9 10
|
class Person
{
public:
int age;
};
int main()
{
cout << age; // I want to print the 'age' from 'Person' ?
}
|
That doesn't make any sense. Whose age are you printing? Jeff's? Sue's? All Persons have different ages. There's no one age that is used by all Persons. Therefore if you need to print someone's age.. you need an
object:
1 2 3 4
|
int main()
{
cout << jeff.age; // now this makes sense. We're printing Jeff's age
}
|
That's how classes work. They represent "thing"s.
Person represents a person with an age
std::string represents some textual data
std::list represents a linked list data container
std::ofstream represents a file
etc
With that in mind.... what does
Initialize
represent? Initialize is not a thing... so it really doesn't make any sense for it to be a class.
And what about
Current_room
? That's
kind of a thing -- but it's not a thing in the same sense that Person/string/etc are. It's more like it's trying to be an object. Maybe "Room" would be a thing, and "Current_room" would be an
object of Room, and not another class (similar to how 'jeff' is an object and there's no Jeff class)
So anyway, yeah. Your classes make no sense. All of the possible solutions that you mentioned at the end of your post are all equally valid and equally nonsensical.