so I've made a class in c++ which has 2 reference type members:
class Edge{
private:
const Node& base;
const Node& target;
public:
Edge(const Node& new1, const Node& new2);
I want to give default values to base and target in the C'tor. Which means that:
Edge()
will not be an error, but will do create an Edge object. How do I do that?
edit: I'm also trying to do:
Edge::Edge(const Node& newBase, const Node& newTarg)
{
m_base=newBase;
m_target=newTarg;
}
But it won't let me, it says no operator "=" matches this operators. But I did make a "=" operator for Nodes and checked it worked.......