- #1
needOfHelpCMath
- 72
- 0
Can overload and constructor be in private? for example my overload constructor:
HTML:
class Node {
private:
int Nodedata;
Node *next;
Node() {next = NULL; Nodedata = 0;}
Node(int data = 0, Node *nextNode) { //overloaded constructor
Nodedata = data;
next = nextNode;
}
};
public:
void insertToFront();
void insertBack();
void insertMiddle();