Click here to Skip to main content
15,900,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to make a project resolution independent.? Pin
Jochen Arndt19-Dec-12 0:29
professionalJochen Arndt19-Dec-12 0:29 
GeneralRe: How to make a project resolution independent.? Pin
mbatra3119-Dec-12 0:39
mbatra3119-Dec-12 0:39 
GeneralRe: How to make a project resolution independent.? Pin
Jochen Arndt19-Dec-12 0:52
professionalJochen Arndt19-Dec-12 0:52 
GeneralRe: How to make a project resolution independent.? Pin
mbatra3119-Dec-12 1:25
mbatra3119-Dec-12 1:25 
GeneralRe: How to make a project resolution independent.? Pin
Jochen Arndt19-Dec-12 1:33
professionalJochen Arndt19-Dec-12 1:33 
GeneralRe: How to make a project resolution independent.? Pin
mbatra3119-Dec-12 1:44
mbatra3119-Dec-12 1:44 
GeneralRe: How to make a project resolution independent.? Pin
Jochen Arndt19-Dec-12 2:06
professionalJochen Arndt19-Dec-12 2:06 
AnswerRe: How to make a project resolution independent.? Pin
Alan Balkany19-Dec-12 4:25
Alan Balkany19-Dec-12 4:25 
GeneralRe: How to make a project resolution independent.? Pin
Kimcopeland2-Apr-21 16:18
Kimcopeland2-Apr-21 16:18 
QuestionASM with stams library of C ++ Pin
Gurunathkudalkar18-Dec-12 21:15
Gurunathkudalkar18-Dec-12 21:15 
AnswerRe: ASM with stams library of C ++ Pin
CPallini18-Dec-12 22:19
mveCPallini18-Dec-12 22:19 
Questionerror C2228 "must have class/struct/union" Pin
alaaan7318-Dec-12 4:55
alaaan7318-Dec-12 4:55 
AnswerRe: error C2228 "must have class/struct/union" Pin
Chris Losinger18-Dec-12 5:19
professionalChris Losinger18-Dec-12 5:19 
AnswerRe: error C2228 "must have class/struct/union" Pin
Richard MacCutchan18-Dec-12 7:09
mveRichard MacCutchan18-Dec-12 7:09 
AnswerRe: error C2228 "must have class/struct/union" Pin
Stefan_Lang21-Dec-12 1:59
Stefan_Lang21-Dec-12 1:59 
QuestionCan we capture HD video using DirectShow C++/MFC .? Pin
mbatra3117-Dec-12 23:30
mbatra3117-Dec-12 23:30 
AnswerRe: Can we capture HD video using DirectShow C++/MFC .? Pin
Kimcopeland1-Apr-21 18:32
Kimcopeland1-Apr-21 18:32 
AnswerRe: Can we capture HD video using DirectShow C++/MFC .? Pin
Kimcopeland2-Apr-21 5:01
Kimcopeland2-Apr-21 5:01 
QuestionCWinApp::OnFileNew failed ? Pin
Codzer17-Dec-12 19:23
Codzer17-Dec-12 19:23 
GeneralRe: CWinApp::OnFileNew failed ? Pin
Jochen Arndt17-Dec-12 21:33
professionalJochen Arndt17-Dec-12 21:33 
GeneralRe: CWinApp::OnFileNew failed ? Pin
Codzer18-Dec-12 2:48
Codzer18-Dec-12 2:48 
AnswerRe: CWinApp::OnFileNew failed ? Pin
Jochen Arndt18-Dec-12 3:03
professionalJochen Arndt18-Dec-12 3:03 
QuestionLinked List Via Disk File Pin
imboared117-Dec-12 19:01
imboared117-Dec-12 19:01 
SuggestionRe: Linked List Via Disk File Pin
Richard MacCutchan17-Dec-12 22:15
mveRichard MacCutchan17-Dec-12 22:15 
QuestionConfused with destructor Pin
Super Lloyd17-Dec-12 2:33
Super Lloyd17-Dec-12 2:33 
I know if I have a class like that
C++
class A
{
  shared_ptr<SomeType> data;
}


I don't need to declare a destructor, as the compiler will automatically write one for me that take care of everything.

But what if I have a resource without a destructor, such as a handle.
I need to implement a destructor
C++
class A
{
  shared_ptr<SomeType> data;
  HANDLE wndobj;

  ~A() {
    CloseHandle(wndobj);
    // what of data? should I call data.reset()
  }
}


Do I need to handle all variable? or only those without destructor (i.e. wndobj)?
I.e. what of data?
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.

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.