I have a class called KernelLock, and I am creating an array of KernelLocks called myLockArray. I declare it like this: KernelLock myLockArray[150];
When I try to add a new KernelLock to myLockArray, I get the aforementioned error. Here is the exact line I get the error on:
myLockArray[initializedLocksCounter] = new KernelLock(myAddrSpace, newLock);
and here is the exact error:
error: no match for 'operator=' in 'myLockArray[initializedLocksCounter] = (((KernelLock*)operator new(8u)), (<anonymous>->KernelLock::KernelLock(myAddrSpace, newLock), <anonymous>))
In case it helps, I am compiling with gcc through Nachos.