new & delete on arrays 
Author Message
 new & delete on arrays

Dear Tom
Everything just right, With
char ( *pchararray )[NUMCOLS];
your declare pointer to array of strings, but you do not allocate any memory on heap.

The statement
pchararray = new char [NUMROWS][NUMCOLS] ;
allocates the array of strings ( actually NUMROWS of srings, each one of NUMCOLS
lenght ), then the
delete[] pchararray;
frres this array.
Igor



Wed, 05 Jan 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. error when using delete & new in class

2. new & delete

3. new&delete in different threads

4. new&delete - DLL with own heap...

5. Error Using new & delete in class

6. Overloading new & delete

7. new/delete operator & multithread

8. Use of new & delete

9. new & delete

10. new&delete in different threads

11. new&delete - DLL with own heap...

12. New to structures & arrays

 

 
Powered by phpBB® Forum Software