A const link is passed to the function, for example:
void someFun(const Objtype& object){} How to make the resulting object available to other functions without passing it every time. Those. I want to make it global, something like the following:
Objtype globalobject; void someFun(Objtype& object){ globalobject = object; } void someFun1(){ globalobject.getSomeData(); } void someFun2(){ globalobject.getSomeData(); } How to do this if I get const Objtype &?