Click here to Skip to main content
16,005,473 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to fetch email from aol or hotmail? Pin
coolvcguy27-Feb-03 19:18
coolvcguy27-Feb-03 19:18 
GeneralAssociating a value with Tree Node Pin
Ph@ntom26-Feb-03 22:26
Ph@ntom26-Feb-03 22:26 
GeneralRe: Associating a value with Tree Node Pin
567890123427-Feb-03 1:47
567890123427-Feb-03 1:47 
GeneralIntercepting WM_QUERYENDSESSION Pin
Master Vip26-Feb-03 21:46
Master Vip26-Feb-03 21:46 
GeneralRe: Intercepting WM_QUERYENDSESSION Pin
Hans Ruck26-Feb-03 21:55
Hans Ruck26-Feb-03 21:55 
GeneralWindows skins Pin
Anonymous26-Feb-03 21:45
Anonymous26-Feb-03 21:45 
Questiondelete Operator? Pin
anju26-Feb-03 21:15
anju26-Feb-03 21:15 
AnswerRe: delete Operator? Pin
Hans Ruck26-Feb-03 21:36
Hans Ruck26-Feb-03 21:36 
for(int nIndex=0;nIndex<10;nIndex++)
{
  delete [] objSomeC[nIndex].objSomeA; // =new CSomeA[10];
}
delete [] objSomeC;
If you want to do it at the object's destruction, you might use this variant:
class CMainOne
{
  
public:
  class CSomeA
  {
  public:
    int nXA;
    int nYA;
  };
  
  class CSomeC
  {
  public:
    ~CSomeC()
    {
      delete [] objSomeA;
    }
    int nXC;
    int nYC;
    CSomeA *objSomeA;
  };
  
  CMainOne();
  ~CMainOne()
  {
    delete [] objSomeC;
  }
  CSomeC * objSomeC;
  
};//Class CMainOne

//In MainOne.cpp

CMainOne::CMainOne()
{
  objSomeC=new CSomeC[10];
  
  for(int nIndex=0;nIndex<10;nIndex++)
  {
    objSomeC[nIndex].objSomeA=new CSomeA[10];
  }
}
with the usual checkins i've omitted for brevity.

rechi
GeneralRe: Thanks.. Pin
anju27-Feb-03 0:13
anju27-Feb-03 0:13 
AnswerRe: delete Operator? Pin
Johnny ²26-Feb-03 21:36
Johnny ²26-Feb-03 21:36 
GeneralDisable the Default Pop-up Menu for CHtmlView Pin
lukmyt26-Feb-03 19:39
lukmyt26-Feb-03 19:39 
GeneralRe: Disable the Default Pop-up Menu for CHtmlView Pin
HENDRIK R26-Feb-03 22:00
HENDRIK R26-Feb-03 22:00 
GeneralAbout #pragma Pin
IMiracle26-Feb-03 18:54
IMiracle26-Feb-03 18:54 
GeneralRe: About #pragma Pin
berndg26-Feb-03 20:57
berndg26-Feb-03 20:57 
GeneralDialog Image Control Pin
lead2gold26-Feb-03 16:49
lead2gold26-Feb-03 16:49 
GeneralRe: Dialog Image Control Pin
Chris Richardson26-Feb-03 17:19
Chris Richardson26-Feb-03 17:19 
GeneralRe: Dialog Image Control Pin
lead2gold27-Feb-03 16:48
lead2gold27-Feb-03 16:48 
GeneralRe: Dialog Image Control Pin
Chris Richardson27-Feb-03 17:02
Chris Richardson27-Feb-03 17:02 
GeneralRe: Dialog Image Control Pin
ashxly26-Feb-03 18:17
ashxly26-Feb-03 18:17 
GeneralRe: Dialog Image Control Pin
Chris Richardson27-Feb-03 17:02
Chris Richardson27-Feb-03 17:02 
GeneralExit codes... Pin
el davo26-Feb-03 16:49
el davo26-Feb-03 16:49 
GeneralRe: Exit codes... Pin
-Dy27-Feb-03 4:02
-Dy27-Feb-03 4:02 
GeneralRe: Exit codes... Pin
el davo27-Feb-03 13:09
el davo27-Feb-03 13:09 
GeneralRe: Exit codes... Pin
-Dy27-Feb-03 22:41
-Dy27-Feb-03 22:41 
GeneralVC++ CFileSave Pin
arungorur26-Feb-03 15:48
arungorur26-Feb-03 15:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.