is this code correct ?
because when I do things like that:
it works with or without the copy constructor !!!
and upon closing my console gives me that error in both cases:
Debug Assertion Failed!
Program:...o
...\MyProgram.e xe
File:...\dbgdel .cpp
Line:52
Expression:_BLO CK_TYPE_IS_VALI D(pHead->nBlockUse)
Code:
DynamicVector::DynamicVector(const DynamicVector& copy) { if(this != ©) { this->length = copy.length; for(int i = 0; i < copy.length; i++) *(this->v+i) = *(copy.v+i); } }
Code:
DynamicVector v(5), t(7); v=t;
and upon closing my console gives me that error in both cases:
Debug Assertion Failed!
Program:...o
...\MyProgram.e xe
File:...\dbgdel .cpp
Line:52
Expression:_BLO CK_TYPE_IS_VALI D(pHead->nBlockUse)
Comment