Taiwo A.

asked • 04/01/22

I keep getting this error...can someone help me??

inlab17a.cpp: In function ‘int main()’:

inlab17a.cpp:16:9: error: request for member ‘readFile’ in ‘store1’, which is of non-class type ‘StoreClass()’

store1.readFile("ex3_data.0");

^~~~~~~~

inlab17a.cpp:19:9: error: request for member ‘PrintStore’ in ‘store1’, which is of non-class type ‘StoreClass()’

store1.PrintStore();


and here is the code

//File: inlab17a.cpp

//

//This is a simple test program to test the

//store class.


#include "storeClassa.h"


int main()

{

//create an instance of the store class

//add the declaration for store 1 using

//the default constructor here

StoreClass store1();


//read information about the store

store1.readFile("ex3_data.0");


//print all information about the store

store1.PrintStore();


return 0;

}


1 Expert Answer

By:

Donald W. answered • 04/01/22

Tutor
5.0 (214)

Senior Software Engineer with over 25 years of industry experience

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.