Konstruktor:
CVector::CVector( int dimension ) { #ifdef _DEBUG if(dimension<=0) { cout << "negative dimension in constructor?\n"; cout << "dimension = " << dimension << endl; exit(1); } #endif vector = new double[dimension]; CVector::dimension = dimension; }
Destruktor:
CVector::~CVector( ) { delete [] vector; }