Click here to Skip to main content
15,887,477 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Why #if 0 ... #endif Pin
CPallini15-Jan-23 20:36
mveCPallini15-Jan-23 20:36 
QuestionWhere does this .exe store its pane layout? Pin
Bardo Mueller15-Jan-23 9:09
Bardo Mueller15-Jan-23 9:09 
AnswerRe: Where does this .exe store its pane layout? Pin
OriginalGriff15-Jan-23 9:10
mveOriginalGriff15-Jan-23 9:10 
GeneralRe: Where does this .exe store its pane layout? Pin
Bardo Mueller15-Jan-23 11:30
Bardo Mueller15-Jan-23 11:30 
QuestionMessage Closed Pin
14-Jan-23 5:42
Member 1496877114-Jan-23 5:42 
AnswerRe: Why "so many " - include , forward declaration... Pin
CPallini14-Jan-23 7:23
mveCPallini14-Jan-23 7:23 
AnswerRe: Why "so many " - include , forward declaration... Pin
Richard MacCutchan14-Jan-23 22:25
mveRichard MacCutchan14-Jan-23 22:25 
AnswerRe: Why "so many " - include , forward declaration... Pin
jschell15-Jan-23 8:00
jschell15-Jan-23 8:00 
Member 14968771 wrote:
Why so many


That is usually a subjective thing. In general it should not be required.

But what happens, over time, is that as complexity grows so does the definitions.

And there are only two choices
1. Include the actual source of the definition
2. Include a short cut.

The first solution, in general requires that the compiler reread (parse, tokenize, etc) the full included source files every time and then likely the includes for those as well and that can continue for a while. That takes time. Compilers, now, tend to attempt to optimize that by using various caching strategies. But, at least in the past, some of those were less than reliable.

So people might want to avoid that by using short cuts. Thus the compiler can do far less work. And that is what that is.

Ideally of course the design should minimize all of that. Even at times to the point of perhaps reducing clarity. One trick that I used to use was to create two includes. One that was only for public consumption and the other for internal consumption (for example internal structs) and then the public visible items used something like a 'void *' and then I used casts for the internals. That did allow the external include to be smaller it size but it was a solution that only worked in some cases.
GeneralMessage Closed Pin
15-Jan-23 16:56
Member 1496877115-Jan-23 16:56 
GeneralRe: Why "so many " - include , forward declaration... Pin
jschell17-Jan-23 3:33
jschell17-Jan-23 3:33 
QuestionCRichEditCtrl size limit Pin
ForNow11-Jan-23 15:22
ForNow11-Jan-23 15:22 
AnswerRe: CRichEditCtrl size limit Pin
Mircea Neacsu11-Jan-23 15:47
Mircea Neacsu11-Jan-23 15:47 
GeneralRe: CRichEditCtrl size limit Pin
ForNow11-Jan-23 15:48
ForNow11-Jan-23 15:48 
QuestionBitmaps, device dependent vs device independent, which is faster (or better)? Pin
Member 1507871611-Jan-23 10:57
Member 1507871611-Jan-23 10:57 
AnswerRe: Bitmaps, device dependent vs device independent, which is faster (or better)? Pin
CPallini11-Jan-23 20:43
mveCPallini11-Jan-23 20:43 
Questionwhat I am doing regarding Heap corruption Pin
ForNow10-Jan-23 15:33
ForNow10-Jan-23 15:33 
AnswerRe: what I am doing regarding Heap corruption Pin
CPallini10-Jan-23 20:08
mveCPallini10-Jan-23 20:08 
GeneralRe: what I am doing regarding Heap corruption Pin
ForNow11-Jan-23 1:33
ForNow11-Jan-23 1:33 
GeneralRe: what I am doing regarding Heap corruption Pin
CPallini11-Jan-23 1:40
mveCPallini11-Jan-23 1:40 
GeneralRe: what I am doing regarding Heap corruption Pin
Mircea Neacsu11-Jan-23 7:04
Mircea Neacsu11-Jan-23 7:04 
GeneralRe: what I am doing regarding Heap corruption Pin
ForNow11-Jan-23 7:25
ForNow11-Jan-23 7:25 
QuestionHeap Storage Corruption Pin
ForNow10-Jan-23 3:44
ForNow10-Jan-23 3:44 
AnswerRe: Heap Storage Corruption Pin
Victor Nijegorodov10-Jan-23 5:08
Victor Nijegorodov10-Jan-23 5:08 
GeneralRe: Heap Storage Corruption Pin
ForNow10-Jan-23 5:25
ForNow10-Jan-23 5:25 
GeneralRe: Heap Storage Corruption Pin
k505410-Jan-23 6:17
mvek505410-Jan-23 6:17 

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.