Click here to Skip to main content
15,917,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Entering ? into edit box SOLVED Pin
Richard Andrew x644-Oct-11 16:38
professionalRichard Andrew x644-Oct-11 16:38 
GeneralRe: Entering ? into edit box Pin
Chuck O'Toole4-Oct-11 16:15
Chuck O'Toole4-Oct-11 16:15 
Questionhow to move button when the dialog is resized? Pin
antonio3434-Oct-11 7:29
antonio3434-Oct-11 7:29 
AnswerRe: how to move button when the dialog is resized? Pin
Maximilien4-Oct-11 8:02
Maximilien4-Oct-11 8:02 
GeneralRe: how to move button when the dialog is resized? Pin
antonio3434-Oct-11 8:17
antonio3434-Oct-11 8:17 
GeneralRe: how to move button when the dialog is resized? Pin
Maximilien4-Oct-11 8:22
Maximilien4-Oct-11 8:22 
GeneralRe: how to move button when the dialog is resized? Pin
antonio3434-Oct-11 8:45
antonio3434-Oct-11 8:45 
QuestionRe: how to move button when the dialog is resized? Pin
David Crow4-Oct-11 8:54
David Crow4-Oct-11 8:54 
AnswerRe: how to move button when the dialog is resized? Pin
antonio3434-Oct-11 9:04
antonio3434-Oct-11 9:04 
QuestionRe: how to move button when the dialog is resized? Pin
David Crow4-Oct-11 9:21
David Crow4-Oct-11 9:21 
GeneralRe: how to move button when the dialog is resized? Pin
TheGreatAndPowerfulOz4-Oct-11 9:01
TheGreatAndPowerfulOz4-Oct-11 9:01 
GeneralRe: how to move button when the dialog is resized? Pin
antonio3434-Oct-11 11:21
antonio3434-Oct-11 11:21 
GeneralRe: how to move button when the dialog is resized? Pin
Chuck O'Toole4-Oct-11 12:22
Chuck O'Toole4-Oct-11 12:22 
GeneralRe: how to move button when the dialog is resized? Pin
TheGreatAndPowerfulOz4-Oct-11 12:28
TheGreatAndPowerfulOz4-Oct-11 12:28 
GeneralRe: how to move button when the dialog is resized? Pin
Chuck O'Toole4-Oct-11 13:55
Chuck O'Toole4-Oct-11 13:55 
AnswerRe: how to move button when the dialog is resized? Pin
David Crow4-Oct-11 9:03
David Crow4-Oct-11 9:03 
GeneralRe: how to move button when the dialog is resized? Pin
TheGreatAndPowerfulOz4-Oct-11 9:37
TheGreatAndPowerfulOz4-Oct-11 9:37 
AnswerRe: how to move button when the dialog is resized? Pin
Chuck O'Toole4-Oct-11 12:11
Chuck O'Toole4-Oct-11 12:11 
AnswerRe: how to move button when the dialog is resized? Pin
Rolf Kristensen8-Oct-11 10:38
Rolf Kristensen8-Oct-11 10:38 
QuestionIssue with CreateInstance and E_NOINTERFACE Pin
BeerFizz4-Oct-11 5:16
BeerFizz4-Oct-11 5:16 
QuestionWin API custom control in a DLL Pin
Igen14-Oct-11 4:35
Igen14-Oct-11 4:35 
AnswerRe: Win API custom control in a DLL Pin
Igen14-Oct-11 5:12
Igen14-Oct-11 5:12 
QuestionHow to clear Object memory of Map Pin
002comp3-Oct-11 21:05
002comp3-Oct-11 21:05 
Hello Friends

I am creating a map of key as string and data is of One class Object reference.
As i am inserting data into map as i am getting new string,so before loading new object I am deleting last object.but As i delete object,It is clearing from map also.

Here is the sample of code

C++
class Test
{
  int a;
  int b;
}

map<string,Test*> mapTest;

As I run a loop of my some condition
On adding every new string that is some file name i am reading file values into that class.

Test* obj = new Test();
for(.......)
{
 ...
 ...
 reading File int obj pointer
 And then inserting into map
 mapTest.insert(make_pair(string,objTest));
}

delete obj;
obj=NULL;
//As i delete obj then it gets cleared from map also.

Any Suggestions.


Thanks & Regards
Yogesh
AnswerRe: How to clear Object memory of Map Pin
Richard MacCutchan3-Oct-11 21:26
mveRichard MacCutchan3-Oct-11 21:26 
GeneralRe: How to clear Object memory of Map Pin
002comp3-Oct-11 22:05
002comp3-Oct-11 22:05 

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.