Hello everyone, I'm having trouble with one of my functions. I'm receiving error messages that say there is no function function to call, but the function exists and I've already checked for any typos. The other functions I've called to in main are typed the exact same way and are having no problems. I'm still new to c++ and programming in general, so any help/advice is appreciated. The error messages I'm receiving are:
new1.cpp: In function 'int main()':
new1.cpp:96:26: error: no matching function for call to 'Stringer::describe()'
stringerOne.describe();
^
new1.cpp:36:8: note: candidate: void Stringer::describe(bool)
void describe(bool longForm)
^~~~~~~~
new1.cpp:36:8: note: candidate expects 1 argument, 0 provided
> note: candidate: void Stringer::describe(bool)
> note: candidate expects 1 argument, 0 provided
the functiosn ask for a parameter, you need to provide a parameter
By the way, ¿why do you do compare a boolean against true/false? for example, your wrote if (stringerOne.contains(tempString) == true) instead of simply if (stringerOne.contains(tempString))
Thanks ne555, that solved my problem. As for comparing boolean against true against true/false, I thought I needed "== true" for it to function. I took your advice and shortened it to simply (stringerOne.contains(tempString)). I'm a novice to c++ and programming in general, so I'm still trying to get a handle on all this. I really appreciate your help. I wouldn't have been able to get my program to run without you.