according to decode, my insert functions in bag do not exist or do not match, I am also getting an error because the function only has one arguement supposedly? I checked against the infor my professor gave the class and it matches what he says it is supposed to be so I am really confused.
set_item and setItem are spelled differently.
Same with insert_item and insertItem
Im not quite sure what you mean by this, there are supposed to be 2 different ways to insert/set in our program, he wants us to do it by making the itme first and adding it and also in one fell swoop.
They should be spelled the same. That's allowed in C++. They are distinguished by having different arguments. The following compiles but still doesn't work properly. You're trying to insert 5 items but have only requested space for 4.
Well, that will be fun telling the professor that his code to copy doesnt function. fixed those issues, on to the next one.
So there is also a boolean function called contains at line 81.
I am getting these back from Clion debug about that one line of code:
note: no known conversion for argument 1 from 'Item' to 'std::__cxx11::string' {aka 'std::__cxx11::basic_string<char>'}
C:-----------.cpp: In member function 'int Bag::get_index_of(Item)':
note: no known conversion for argument 1 from 'Item' to 'std::__cxx11::string' {aka 'std::__cxx11::basic_string<char>'}
note: no known conversion for argument 1 from 'Item' to 'std::__cxx11::string' {aka 'std::__cxx11::basic_string<char>'}
C:\Users\jakel\CLionProjects\p4.cpp\p4.cpp: In member function 'int Bag::get_index_of(Item)':
Thanks for your help by the way, I wasnt getting any feedback from the professor right now and wont see any classmates until after this is due. Means a lot.