Hi everyone,
I just switched from Java to C++ and not so familiar with memory management in C++. I dynamically allocated an array which holds F_HeapNode objects. Whenever I assigned a value to the element of this array, I got an error message saying" no operator = matched these operands".
F_HeapNode *degreeTable;
degreeTable= new F_HeapNode [num];
for (int i = 0; i < num; i++)
degreeTable=NULL;
.....
degreeTable[2]=a;
How do I assign values to the elements of the array like this?
Thanks in advance!