But now let's say i create multiple objects with the class obj like this;
obj a, b;
Pressing Q would delete 2 items together, because the 2 objects i created have their own vectors.
Is there any way to create an global vector for any object that i create from the class obj?
Sorry, I did not pointed out, but in my program, it's not actually a function call.
By default the object is checking if "Q" is pressed. It means on every object instance, they are all checking if "Q" is pressed.
EDIT:
I made it like a function, and now if i call if on only one object, it removes one by one from the last one in the vector. Exactly what i needed actually.
It's not a prefect solution but it would do the job. Thanks =]