Click here to Skip to main content
15,905,323 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Install Shield details Pin
neo2k324-Dec-03 5:17
neo2k324-Dec-03 5:17 
QuestionHow to Enumerate Window CE process Pin
Member 39424123-Dec-03 21:52
Member 39424123-Dec-03 21:52 
Generalstandard scrollbar & scrollbar control Pin
ashxly23-Dec-03 21:51
ashxly23-Dec-03 21:51 
GeneralRe: standard scrollbar & scrollbar control Pin
Monty223-Dec-03 22:37
Monty223-Dec-03 22:37 
GeneralRe: standard scrollbar & scrollbar control Pin
ashxly23-Dec-03 23:00
ashxly23-Dec-03 23:00 
GeneralRe: standard scrollbar & scrollbar control Pin
Monty223-Dec-03 23:56
Monty223-Dec-03 23:56 
GeneralRe: standard scrollbar & scrollbar control Pin
ashxly24-Dec-03 14:34
ashxly24-Dec-03 14:34 
GeneralClass Member Variables:instance Vs pointer Pin
hehenoobhehe23-Dec-03 21:08
hehenoobhehe23-Dec-03 21:08 
I am in the process of reorganizing my code and came across and I came across a problem, as described in the subject line of this posting.

I have many classes that have instances of other classes as member variables. So including a forward declaration doesnt help, does it? Faced with these, I had the following options:
-Include the appropriate header in the header file that contains the class definition that has a member variable that is a class instance as opposed to a pointer to the class
-Change the member variable from being a class instance to a class pointer.

I have the following questions:
1) Which approach is *better* and why?
2) If you need to include the header and the forward declaration of the class doesnt help(which is reasonable) what do you do?
For now, Im using this

#ifndef __FILE_H<br />
#include "File.h"<br />
#endif


Thanks in advance.
GeneralRe: Class Member Variables:instance Vs pointer Pin
Johnny ²23-Dec-03 23:30
Johnny ²23-Dec-03 23:30 
QuestionHow to get the text of the button on the ctoolbarctrl? Pin
benben23-Dec-03 21:06
benben23-Dec-03 21:06 
QuestionHow detect of USB Web-Came connect on PC Pin
trekhlebov23-Dec-03 20:44
trekhlebov23-Dec-03 20:44 
AnswerRe: How detect of USB Web-Came connect on PC Pin
Monty223-Dec-03 23:51
Monty223-Dec-03 23:51 
GeneralSetting attributes of a file/folder Pin
rohit.dhamija23-Dec-03 20:18
rohit.dhamija23-Dec-03 20:18 
GeneralRe: Setting attributes of a file/folder Pin
Monty223-Dec-03 23:44
Monty223-Dec-03 23:44 
GeneralRe: Setting attributes of a file/folder Pin
valikac24-Dec-03 6:10
valikac24-Dec-03 6:10 
GeneralEnable / disable a LAN adapter programmatically Pin
Jayanta Basu23-Dec-03 18:37
Jayanta Basu23-Dec-03 18:37 
GeneralClipcursor Error Pin
pranavamhari23-Dec-03 18:22
pranavamhari23-Dec-03 18:22 
GeneralMFC's future Pin
java_jedi23-Dec-03 17:46
java_jedi23-Dec-03 17:46 
GeneralRe: MFC's future Pin
pranavamhari23-Dec-03 18:14
pranavamhari23-Dec-03 18:14 
GeneralRe: MFC's future Pin
Michael P Butler24-Dec-03 2:49
Michael P Butler24-Dec-03 2:49 
QuestionHow could I get back my Save.cpp ? Pin
ljx23-Dec-03 16:42
ljx23-Dec-03 16:42 
AnswerRe: How could I get back my Save.cpp ? Pin
Anonymous23-Dec-03 17:58
Anonymous23-Dec-03 17:58 
GeneralRe: How could I get back my Save.cpp ? Pin
ljx23-Dec-03 18:29
ljx23-Dec-03 18:29 
AnswerRe: How could I get back my Save.cpp ? Pin
Gary R. Wheeler26-Dec-03 5:17
Gary R. Wheeler26-Dec-03 5:17 
GeneralRe: How could I get back my Save.cpp ? Pin
ljx28-Dec-03 13:53
ljx28-Dec-03 13:53 

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.