I totally disappointed. I have class, there I have private structure. And what's the silly problem: I just can't preinitialize some variables!
What I mean:
I need:
struct someStruct
{
someStruct *next = NULL;
int number;
};
I just want to create easy dynamic list, adding new elements from heap.
And what I should do?
struct someStruct
{
someStruct *next;
int number;
};
Put
someStruct *newElement = new someStruct;
newElement.next = NULL;
every time? I can forget about this.
Please help me. Because it's not a problem when I need to add 1 useless string. But what if I have 50 default variables?