Click here to Skip to main content
15,302,851 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is my function declaration in the header file but how would I call them in main.cpp. I called my add function like this
list.add(artist, sName, size, likes);
but I don't understand how to do the other ones.
bool add (char *&, char *&, double &, int &);
bool addRec (node * curr, node * data);
bool editLikes (char *&, char *&, int &);
const bool showAll ();
const bool showArtist (node * curr, const char *);
bool removeByLikes (int &);
bool deleteRec (node *);
const bool printRec (node *);

What I have tried:

I've done a bit of googling but that is about it.
Updated 28-Apr-21 11:18am
CPallini 29-Apr-21 1:59am
The function signatures are not pretty at all. Maybe you need to revise your approach to the problem.

1 solution

So, you know how to call this function:
bool add (char *&, char *&, double &, int &);
It's just:
list.add(artist, sName, size, likes);

So it's likely that the others follow the same pattern:

Now, we can't see the functions, we have no idea what the parameters do, or what classes / instances they relate to. So the best we can do to help is to suggest the first one, and let you workout the details:
if (!addRec (&curr, %&data))
   ... report a problem ...

But what I don't understand is how you could write all these functions without having any idea how to call them ... that's pretty basic stuff!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900