Click here to Skip to main content
15,884,838 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Sort the list of files available in a folder. Pin
Richard MacCutchan21-Jun-11 2:59
mveRichard MacCutchan21-Jun-11 2:59 
AnswerRe: Sort the list of files available in a folder. Pin
వేంకటనారాయణ(venkatmakam)21-Jun-11 3:05
వేంకటనారాయణ(venkatmakam)21-Jun-11 3:05 
QuestionQuestion about Getting Main Icon using Findresource() Pin
lek25820-Jun-11 21:51
lek25820-Jun-11 21:51 
AnswerRe: Question about Getting Main Icon using Findresource() Pin
Richard MacCutchan21-Jun-11 2:01
mveRichard MacCutchan21-Jun-11 2:01 
AnswerRe: Question about Getting Main Icon using Findresource() Pin
MicroVirus21-Jun-11 5:50
MicroVirus21-Jun-11 5:50 
Questionproblem while freeing a link list within a vector structure [modified] Pin
Madan Chauhan20-Jun-11 21:27
Madan Chauhan20-Jun-11 21:27 
AnswerRe: problem while freeing a link list within a vector structure Pin
CPallini20-Jun-11 22:12
mveCPallini20-Jun-11 22:12 
AnswerRe: problem while freeing a link list within a vector structure Pin
Stefan_Lang21-Jun-11 0:35
Stefan_Lang21-Jun-11 0:35 
You did not dynamically allocate the first member, so you cannot dynamically free it either.

More to the point: when you push_back() a struct object into that vector of yours, the vector will allocate the required memory and copy the struct you passed into that memory location. The vector is thus responsible for the releaese of that storage, not you. Since you didn't allocate the vector on the heap, it will be automatically deallocated when the variable leaves the scope. But if you defined it globally, then you might want to enforce this earlier, by calling
m_StVector.clear()
.
GeneralRe: problem while freeing a link list within a vector structure Pin
Madan Chauhan21-Jun-11 1:07
Madan Chauhan21-Jun-11 1:07 
GeneralRe: problem while freeing a link list within a vector structure Pin
Stefan_Lang21-Jun-11 1:27
Stefan_Lang21-Jun-11 1:27 
AnswerRe: problem while freeing a link list within a vector structure Pin
CPallini21-Jun-11 1:15
mveCPallini21-Jun-11 1:15 
QuestionRe: problem while freeing a link list within a vector structure Pin
David Crow21-Jun-11 4:04
David Crow21-Jun-11 4:04 
QuestionI am using VC++ coding,Can any one help me? Pin
lucky_122120-Jun-11 21:14
lucky_122120-Jun-11 21:14 
AnswerRe: I am using VC++ coding,Can any one help me? Pin
CPallini20-Jun-11 22:10
mveCPallini20-Jun-11 22:10 
AnswerRe: I am using VC++ coding,Can any one help me? Pin
Cool_Dev20-Jun-11 22:18
Cool_Dev20-Jun-11 22:18 
QuestionConverting char array to CSting Pin
VCProgrammer20-Jun-11 1:43
VCProgrammer20-Jun-11 1:43 
AnswerRe: Converting char array to CSting Pin
Pete O'Hanlon20-Jun-11 1:54
mvePete O'Hanlon20-Jun-11 1:54 
GeneralRe: Converting char array to CSting [modified] Pin
Albert Holguin20-Jun-11 4:36
professionalAlbert Holguin20-Jun-11 4:36 
GeneralRe: Converting char array to CSting Pin
Pete O'Hanlon20-Jun-11 6:10
mvePete O'Hanlon20-Jun-11 6:10 
AnswerRe: Converting char array to CSting Pin
CPallini20-Jun-11 1:55
mveCPallini20-Jun-11 1:55 
AnswerRe: Converting char array to CSting Pin
Rajesh R Subramanian20-Jun-11 3:54
professionalRajesh R Subramanian20-Jun-11 3:54 
Question[Win32]Add context menu to edit control Pin
Member 296547120-Jun-11 1:24
Member 296547120-Jun-11 1:24 
AnswerRe: [Win32]Add context menu to edit control Pin
CPallini20-Jun-11 1:58
mveCPallini20-Jun-11 1:58 
AnswerRe: [Win32]Add context menu to edit control Pin
వేంకటనారాయణ(venkatmakam)20-Jun-11 2:23
వేంకటనారాయణ(venkatmakam)20-Jun-11 2:23 
GeneralRe: [Win32]Add context menu to edit control Pin
Member 296547120-Jun-11 3:07
Member 296547120-Jun-11 3:07 

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.