jeudi 26 mars 2020

C++ - Can I create two indenpent objects from a class which hava a static member class? [closed]

As we known, when we declare a member of a class as static it means no matter how many objects of the class are created, there is only one copy of the static member. A static member is shared by all objects of the class.

But I want to create two indenpent objects from such class. Maybe I can create two objects at different process? Is there any other way?

AND OTHER: Maybe this demand is strange. Because I need to use a third party library, and I can't modify it.

Aucun commentaire:

Enregistrer un commentaire