Can someone please explain this run-time error I'm getting? I'm too stupid to
know what's going on.
Also, please provide an alternative method to what I'm trying to do if possible (not vectors, though).
The error in question is on line 9.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#ifndef _TEST_H_
#define _TEST_H_
constint NUM = 10;
class CTest {
public :
CTest() {
list = newshort[NUM]; //CXX0030 : Error : Expression cannot be evaluated.
for(unsignedshort it=0; it<NUM; it++) {
list[it]=it;
}
}
short* list;
};
#endif