No
error
//
list.h
//...
list::node::node(const winery
&winery)
{
}
void list::insert(const winery&
winery)
{
//const char *Names =
winery.getName();
node *new_node = new node( winery
);
}
Adding the
list::node::node(const winery &winery ) function
to the list.cpp file
enables allocation of the node.
however, it
forces me to add a dfault constructor to the winery
class:
class
winery
{
public :
winery(const char * const name, const
char * const location,
const int acrces, const int rating);
winery();
virtual
~winery(void);
//...
And
thereby havinvg to provide the body of the default ctor.
Is there a way to
have it work without declaring and defining a default ctor to the winery
class?
No comments:
Post a Comment