Click here to Skip to main content
15,908,674 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalmcsd in vc++ Pin
xcavin23-Nov-04 21:32
xcavin23-Nov-04 21:32 
GeneralCListView Problem Pin
Neelesh K J Jain23-Nov-04 21:22
Neelesh K J Jain23-Nov-04 21:22 
GeneralRe: CListView Problem Pin
Mike Danberg24-Nov-04 11:47
Mike Danberg24-Nov-04 11:47 
GeneralWrite to a fiel and read the same fiel in real time. Pin
amitranjanmishra23-Nov-04 21:17
amitranjanmishra23-Nov-04 21:17 
GeneralRe: Write to a fiel and read the same fiel in real time. Pin
toxcct23-Nov-04 22:10
toxcct23-Nov-04 22:10 
GeneralRe: Write to a fiel and read the same fiel in real time. Pin
Robert Bielik23-Nov-04 22:42
Robert Bielik23-Nov-04 22:42 
GeneralPassing object as parameter problem Pin
impeham23-Nov-04 20:29
impeham23-Nov-04 20:29 
GeneralRe: Passing object as parameter problem Pin
PJ Arends23-Nov-04 20:59
professionalPJ Arends23-Nov-04 20:59 
The easist way to fix this is to pass the BUFFER to func1 by reference.
void func1(BUFFER &buf)
{
   ...
}
What is happening in your code is that when func1() is called, a local copy of BUFFER is made that is destroyed when the function exits. By using a reference, you access the original BUFFER, not a new copy, so it does not go out of scope at the end of the function, and it's destructor is not called.



"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

"Obviously ???  You're definitely a superstar!!!" mYkel - 21 Jun '04

Within you lies the power for good - Use it!
GeneralRe: Passing object as parameter problem Pin
impeham23-Nov-04 21:02
impeham23-Nov-04 21:02 
GeneralRe: Passing object as parameter problem Pin
PJ Arends23-Nov-04 21:17
professionalPJ Arends23-Nov-04 21:17 
GeneralRe: Passing object as parameter problem Pin
impeham23-Nov-04 21:26
impeham23-Nov-04 21:26 
GeneralRe: Passing object as parameter problem Pin
toxcct23-Nov-04 22:29
toxcct23-Nov-04 22:29 
GeneralDetermine desktop bits per pixel format. Pin
Nick Z.23-Nov-04 19:10
Nick Z.23-Nov-04 19:10 
GeneralIcons Pin
Flame Gitsnik23-Nov-04 19:07
Flame Gitsnik23-Nov-04 19:07 
GeneralConvert Long To Byte Pin
RYU^^23-Nov-04 19:05
RYU^^23-Nov-04 19:05 
GeneralRe: Convert Long To Byte Pin
geo_m23-Nov-04 23:04
geo_m23-Nov-04 23:04 
GeneralRe: Convert Long To Byte Pin
RYU^^24-Nov-04 13:35
RYU^^24-Nov-04 13:35 
Generalabt Alt+keys Pin
Tripura.K23-Nov-04 18:26
Tripura.K23-Nov-04 18:26 
GeneralRe: abt Alt+keys Pin
rabih_kai23-Nov-04 18:45
rabih_kai23-Nov-04 18:45 
GeneralRe: abt Alt+keys Pin
Anonymous23-Nov-04 23:58
Anonymous23-Nov-04 23:58 
Questionhow to check the execution time of any program that is execute Pin
shiva shankar23-Nov-04 17:03
shiva shankar23-Nov-04 17:03 
AnswerRe: how to check the execution time of any program that is execute Pin
shiraztk23-Nov-04 18:08
shiraztk23-Nov-04 18:08 
GeneralRe: how to check the execution time of any program that is execute Pin
shiva shankar24-Nov-04 17:50
shiva shankar24-Nov-04 17:50 
Generalgraphics program help Pin
glowskull0323-Nov-04 15:28
glowskull0323-Nov-04 15:28 
GeneralTooltip on CHeaderCtrl of CListCtrl Pin
Vancouver23-Nov-04 15:08
Vancouver23-Nov-04 15:08 

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.