I am trying to use classes for the first time. I have 3 files: a header file that defines the class, a cpp file that defines the member-functions, and a cpp file that creates and manipulates the class objects (and includes the main function). I have provided the code I am using for these three files, and the data file I am using. I receive a slew of error messages when I try to run this. What could I be doing wrong?
Line 139: get_item_name is a function name (pointer). Since item_name is private, you're going to need to to read the item name into a temporary string, then call set_item_name with the temporary string.
Line 140: You're trying to input into getter functions. You can't do that.
Line 164,165: These are setters. You're not calling them as functions.
Line 173,175: These are getters, but you're not calling them as functions.