class x
{
private:
int a[n];
public:
int *ptr;
.
.
.
when i tried initiliaze a[n] in constructor like ptr=a and use "a" in some function
still i get private access error how can i deal with this situtaion???
and another question is that how can i free a[n] using destructor and delete????
when i tried i get a lot of memory errors
these are not real code only example i allocated memory for "a" in constuructor but when i tried to free it in destructor like
delete [] a; i get a lot of memory errors