[quote=zodilla58]Please read memory allocation fundamentals from some c++ book or from cplusplus.com or related c++ site. Also read constructor destructor. Follow posting guidelines of TSDN.
with the use of new operator i have to allocate memory of integer array of 10 elements in constructor and similarly deallocate it in destructor.
i know the concept of concept of constructor and destructor
as we use for loop
in constructor
-
-
for (i=0;i<10;i++) &a[i]=new(int); //some thing like that i am not sure whether it is correct or not
-
-
in destructor how to dealloacte this memory
please help me out