![]() |
memory allocation problem in 2d array
--------------------------------------------------------------------------------
hi all am havin a problem with memory allocation of 2d array can any body help me out ... it goes like this char ** a; in a loop for each time a[i] = new char[strlen(name)+1]; strcpy(a[i],name); a[i][strlen(name)+1]='\0'; in a loop i deallocate it with delete[] a[i]; after the loop delete [] a; can any body help me with this ???? thanks in advance... :confused: |
Re: memory allocation problem in 2d array
According to you i run this programm.
No problem . Can you specify your problem problem? Code:
#include<string.h> |
Re: memory allocation problem in 2d array
i have done it in vc++
this is the code Code:
char ** interfaceName; am trying to parse a file put the internal interface of the idl file in to the array its running ok but as soon as i close the dialog box an go to the main dialog box its shows #2 stack around the variable m_dlg( which is a dialog object????) is corrupted |
Re: memory allocation problem in 2d array
I think it's not part of c++. You can put this querry in win32/MFC forum.
|
Re: memory allocation problem in 2d array
Please ensure that no duplication of any article/qwuerry should be.
So please shabbir just close this thread. |
Re: memory allocation problem in 2d array
I have closed your other thread and moved the current thread to MFC/Win32 forum
|
| All times are GMT +5.5. The time now is 04:45. |