I have to pass a pointer as a parameter, but I can't quite get the syntax down.
I have this variable:
std::vector<Foo > fooVector;
And this function of another class, Foo
void Add (Foo * N)
So I need to pass fooVector_[size_t] to the Add function.
I have tried this:
Foo foo;
foo.Add(foo.foo Vector_[size_t]) but get the error (shortened) Needs class::Foo* not class::Foo&
Could you please point* me in the right direction.
I have this variable:
std::vector<Foo > fooVector;
And this function of another class, Foo
void Add (Foo * N)
So I need to pass fooVector_[size_t] to the Add function.
I have tried this:
Foo foo;
foo.Add(foo.foo Vector_[size_t]) but get the error (shortened) Needs class::Foo* not class::Foo&
Could you please point* me in the right direction.
Comment