I have a class constructor that I want to take pointers as formal parameters, but something seems to be going very wrong when I try to call it.
I don't think the details of the constructor are necessary, but I have 3 classes that I have created, called expData, restaurant and table. The expData and restaurant classes have default constructors, while table has the following prototype:
table(expData* firstCustomerPtr, restaurant* rp);
i.e. takes a pointer to an object of expData and a pointer to an object of restaurant.
As an example, say I use the following code:
1 2 3
|
expData* blah1 = new expData;
restaurant* blah2 = new restaurant;
table blah = table(blah1, blah2);
|
Which gives me an error: no function for call to 'table::table(expData*&, restaurant*&)'. But my understanding of that code is that I'm passing an expData* and a restaurant* to the function.
I think I'm doing something very wrong here since I am a terrible programmer, but if someone could shed some light, that'd be great!