VS 2015 c++ compile issue -
i have code snipped i've been using while create dynamic arrays, , stopped working. this meant create dynamic array without use of vector in c++ console applications. older programs have worked fine in past no longer compile while included though. int main() { int n = 5; allocatearray newarray(n); int *myarray = newarray.create(); delete[] myarray; return 0; } class allocatearray { private: int *newarray; int size; public: allocatearray(int); int* create() { return (newarray = new int[size]); } ~allocatearray() { delete newarray; } }; allocatearray::allocatearray(int n) { size = n; } with in header int* allocatearray(int n); this error log, can find whats happening? severity code description error c2065 'allocatearray': undeclared identifier error c2146 syntax error: missing ';' before identifier 'newarray' error c3861 'newarray': identifier ...