I'm attempting to pass a couple of variables over to my Item.cpp class, that is description and item_price. However under item.set(description,item_price), i get three errors. One under the . (period) saying : expected an identifier and two more under description and item_price stating that variable " xxx " is not a type name.
Main.cpp
As they have mentioned and you ignored. In your main function you are using your item class as a variable. item.set(description, item_price); You must declare the class object first. Also you do realize creating that namespace is utterly useless if you are going to put usingnamespace items; it would be best to create the object like
how would i go by sending the array number to display()?, i need to cycle through my description and itemprice array and display it accordingly in display()