I do not know how to call a function with a reference in it :( It is a silly noob question I know.
The header is let's call it ref.h
has a function in it that is:
virtual int funcName (Bike &biker, BikeArray &bikearray, int x, int y .... )
Within ref.h
there is another header that is called Bike.h
.
How do I call funcName
from my main.cpp
(obv. I included Bike.h
and ref.h
I have called other functions from ref.h
in my program, but the other functions did not have references to Bike in them, just variables... How do I declare everything?
What I have so far:
ref *ref;
Bike bike;
BikeArray bikearray;
int x, y;
ref = ref::createinstace(configFile);
ref->funcName(bike, bikearray, x,y);
ref->funcName should return results based on the configFile i passed. I have done this earlier with another function in ref.h, but that function only had int's and doubles... no objects to Bike ...
... and I get the Error "no matching function for call ref::funcName(Bike&, BikeArray&, int&, int&)
Sorry, I know this is a novice question!