Hi guys,
I'm trying to use a function which returns a pointer to a vector element, but it doesn't really work - and since I'm not so experienced in C++ and especially pointers, hoped that someone could help me out.
The function is defined as
Obj* MyClass::FindObj(std::vector<Obj*>&, string Label_){
...
...
return itObj*;
}
The function is supposed to find the object in the object vector and return a pointer to this element. So I call the function as
MyClass::Obj Object* = TestLesen.FindObj(std::vector<Obj*>&, NameObj_);
This (and multiple variations of this) return a number of errors, started with Object: undeclared identifier.
I suppose it's an error in reasoning I'm having problems with .. Does anyone have a clue?
Thanks in advance