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

C / C++ / MFC

 
GeneralRe: Heap ,Stack allocation question Pin
Richard MacCutchan5-Mar-14 4:48
mveRichard MacCutchan5-Mar-14 4:48 
GeneralRe: Heap ,Stack allocation question Pin
econy5-Mar-14 5:04
econy5-Mar-14 5:04 
GeneralRe: Heap ,Stack allocation question Pin
Richard MacCutchan5-Mar-14 5:29
mveRichard MacCutchan5-Mar-14 5:29 
GeneralRe: Heap ,Stack allocation question Pin
econy5-Mar-14 9:06
econy5-Mar-14 9:06 
AnswerRe: Heap ,Stack allocation question Pin
Richard Andrew x645-Mar-14 10:10
professionalRichard Andrew x645-Mar-14 10:10 
GeneralRe: Heap ,Stack allocation question Pin
econy5-Mar-14 15:28
econy5-Mar-14 15:28 
GeneralRe: Heap ,Stack allocation question Pin
Richard MacCutchan5-Mar-14 22:24
mveRichard MacCutchan5-Mar-14 22:24 
Question#include cpp file - how it works? Pin
Vaclav_5-Mar-14 3:26
Vaclav_5-Mar-14 3:26 
I am using DirectShow "common" dshowutil.cpp file and I just found this, to me new , usage of #include directive.
It only works if included in a source file where its function(s) are used.
Makes sense.
Elsewhere the linker generates multiple definitions, so it must be included somewhere else, I did not search for it.

Here is the #include:

#pragma message("Common DirectShow support ")
#include "D:\00\0 SDK\DIrectShow 8.1 SDK\samples\Multimedia\DirectShow\Common\dshowutil.cpp"

And here is the usage sample:

TRACE("\nFind input and output pins and connect them");
IPin * pCapOut = GetOutPin( pDocument->pC_Graph->gcap.pVCap, 0 );

In my view it prepends the working source file.

I would like some other explanations from the group.

Is such usage of including cpp file common?

Thanks for your time.
CHeers
Vaclav
AnswerRe: #include cpp file - how it works? Pin
Jochen Arndt5-Mar-14 4:12
professionalJochen Arndt5-Mar-14 4:12 
AnswerRe: #include cpp file - how it works? Pin
Richard MacCutchan5-Mar-14 4:44
mveRichard MacCutchan5-Mar-14 4:44 
GeneralRe: #include cpp file - how it works? Pin
Vaclav_5-Mar-14 5:10
Vaclav_5-Mar-14 5:10 
GeneralRe: #include cpp file - how it works? Pin
Richard MacCutchan5-Mar-14 5:31
mveRichard MacCutchan5-Mar-14 5:31 
GeneralRe: #include cpp file - how it works? Pin
leon de boer9-Mar-14 8:51
leon de boer9-Mar-14 8:51 
QuestionCMap class questions [Solved] Pin
econy5-Mar-14 2:14
econy5-Mar-14 2:14 
AnswerRe: CMap class questions Pin
CPallini5-Mar-14 2:47
mveCPallini5-Mar-14 2:47 
GeneralRe: CMap class questions Pin
econy5-Mar-14 3:18
econy5-Mar-14 3:18 
SuggestionRe: CMap class questions Pin
Richard MacCutchan5-Mar-14 3:13
mveRichard MacCutchan5-Mar-14 3:13 
GeneralRe: CMap class questions Pin
econy5-Mar-14 3:44
econy5-Mar-14 3:44 
GeneralRe: CMap class questions Pin
Richard MacCutchan5-Mar-14 4:37
mveRichard MacCutchan5-Mar-14 4:37 
GeneralRe: CMap class questions Pin
econy5-Mar-14 4:07
econy5-Mar-14 4:07 
GeneralRe: CMap class questions Pin
Richard MacCutchan5-Mar-14 4:39
mveRichard MacCutchan5-Mar-14 4:39 
Questionif/else, expression can not be used as a function. C program Pin
cstudent14-Mar-14 20:37
cstudent14-Mar-14 20:37 
AnswerRe: if/else, expression can not be used as a function. C program Pin
Jochen Arndt4-Mar-14 21:12
professionalJochen Arndt4-Mar-14 21:12 
GeneralRe: if/else, expression can not be used as a function. C program Pin
cstudent15-Mar-14 7:14
cstudent15-Mar-14 7:14 
GeneralRe: if/else, expression can not be used as a function. C program Pin
Jochen Arndt5-Mar-14 7:40
professionalJochen Arndt5-Mar-14 7:40 

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.