A want to create some kind of global memory table.
Every time when I create a specific kind of object,
I wolud like to register it in the table, and save some data.
Let assume that this "memory table" is a map,
and a global variable.
Let assume that I have lots of objcets from the same class.
The constructor of these objects
creates a new data entry in the memory table,
and the destructor erase it.
I want that the objects can acces to the table and use it.
My problem is: what kind of map is good for me?
Because I dont want to copy the objects,
I just want to map: obejct reference (or pointer?) -> data
What is the syntax?
merse 0 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.