constructor of base class
Business::Business(const string& nName,const string& nAddress) { name
= nName; address = nAddress; }
constructor that i am trying to use from derived class
Restaurant::Restaurant(const float& nRating,const string& nName,const string& nAddress)
{
Business();
Business::setBusinessName(nName);
Business::setBusinessAddress(nAddress);
rating = nRating;
}
from main I am trying to set the fields of the class from main using the above method which uses the constructor from restaurant class. I keep on getting error invalid use of 'Restaurant::Restaurant'
#include <iostream>
#include <string>
using namespace std;
#include "Restaurant.h"
int main()
{
Restaurant m;
m.Restaurant(2.55 , "s" , "224");
cout << m.getRating() <<endl<< m.getBusinessAddress() <<endl<< m.getBusinessName();
return 0;
}