Click here to Skip to main content
15,906,625 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDebugging Remote Pin
kLvin725-Sep-11 22:54
kLvin725-Sep-11 22:54 
AnswerRe: Debugging Remote Pin
Erudite_Eric7-Sep-11 6:12
Erudite_Eric7-Sep-11 6:12 
QuestionProblem with SetLayeredWindowAttribute Pin
Cold_Fearing_Bird5-Sep-11 19:51
Cold_Fearing_Bird5-Sep-11 19:51 
AnswerRe: Problem with SetLayeredWindowAttribute Pin
Iain Clarke, Warrior Programmer5-Sep-11 21:17
Iain Clarke, Warrior Programmer5-Sep-11 21:17 
GeneralRe: Problem with SetLayeredWindowAttribute Pin
Cold_Fearing_Bird5-Sep-11 21:51
Cold_Fearing_Bird5-Sep-11 21:51 
SuggestionHelp me to choose right "Certification" Pin
shanmugarajaa5-Sep-11 18:57
shanmugarajaa5-Sep-11 18:57 
GeneralRe: Help me to choose right "Certification" Pin
CPallini5-Sep-11 22:03
mveCPallini5-Sep-11 22:03 
GeneralRe: Help me to choose right "Certification" Pin
zhzh6033696217-Sep-11 4:02
zhzh6033696217-Sep-11 4:02 
GeneralRe: Help me to choose right "Certification" Pin
shanmugarajaa7-Sep-11 5:40
shanmugarajaa7-Sep-11 5:40 
GeneralRe: Help me to choose right "Certification" Pin
David Crow7-Sep-11 6:30
David Crow7-Sep-11 6:30 
GeneralRe: Help me to choose right "Certification" Pin
shanmugarajaa7-Sep-11 7:38
shanmugarajaa7-Sep-11 7:38 
QuestionHow to simulate shift-tab to go to previous control? Pin
Gagnon Claude5-Sep-11 14:35
Gagnon Claude5-Sep-11 14:35 
AnswerRe: How to simulate shift-tab to go to previous control? Pin
Code-o-mat6-Sep-11 0:53
Code-o-mat6-Sep-11 0:53 
QuestionSafe App Pin
john56325-Sep-11 3:30
john56325-Sep-11 3:30 
AnswerRe: Safe App Pin
«_Superman_»5-Sep-11 3:46
professional«_Superman_»5-Sep-11 3:46 
GeneralRe: Safe App Pin
john56325-Sep-11 3:53
john56325-Sep-11 3:53 
AnswerRe: Safe App Pin
Emilio Garavaglia5-Sep-11 20:39
Emilio Garavaglia5-Sep-11 20:39 
GeneralRe: Safe App Pin
jschell7-Sep-11 8:23
jschell7-Sep-11 8:23 
GeneralRe: Safe App Pin
Emilio Garavaglia7-Sep-11 20:43
Emilio Garavaglia7-Sep-11 20:43 
Questionspecifications of operator-overload Pin
Cold_Fearing_Bird5-Sep-11 2:07
Cold_Fearing_Bird5-Sep-11 2:07 
AnswerRe: specifications of operator-overload Pin
Code-o-mat5-Sep-11 2:38
Code-o-mat5-Sep-11 2:38 
AnswerRe: specifications of operator-overload Pin
Stefan_Lang5-Sep-11 2:47
Stefan_Lang5-Sep-11 2:47 
QuestionMemory Leak Problem Pin
Amrit Agr5-Sep-11 1:07
Amrit Agr5-Sep-11 1:07 
AnswerRe: Memory Leak Problem Pin
CPallini5-Sep-11 2:03
mveCPallini5-Sep-11 2:03 
Amrit Agr wrote:
I have tried to delete as well, but the next time if i am trying to use.

That isn't clear. What do you mean?

However you should know you need to delete the allocated character arrays together with the struct itself. You may use the destructor for this task:
C++
struct RectStruct
{
  //..
  RectStruct()
  {
    Symp = NULL;
    Remedy = NULL;
  }
  // you may also provide a ctor for the initialization of all the fields
  
  ~RectStruct()
  {
    if (Symp) delete [] Symp;
    if (Remedy) delelte [] Remedy;
  }
};

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

AnswerRe: Memory Leak Problem Pin
Arun Parthasarathy7-Sep-11 2:27
Arun Parthasarathy7-Sep-11 2:27 

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.