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

C / C++ / MFC

 
GeneralGetCommandLine Pin
Toni7823-Jun-03 18:38
Toni7823-Jun-03 18:38 
GeneralRe: GetCommandLine Pin
David Crow24-Jun-03 2:59
David Crow24-Jun-03 2:59 
GeneralRe: GetCommandLine Pin
Toni7824-Jun-03 20:18
Toni7824-Jun-03 20:18 
Generalheader and redefine problem Pin
zecodela23-Jun-03 17:47
zecodela23-Jun-03 17:47 
GeneralRe: header and redefine problem Pin
Ryan Binns23-Jun-03 18:12
Ryan Binns23-Jun-03 18:12 
GeneralRe: header and redefine problem Pin
Toni7823-Jun-03 18:20
Toni7823-Jun-03 18:20 
GeneralRe: header and redefine problem Pin
zecodela23-Jun-03 18:52
zecodela23-Jun-03 18:52 
GeneralRe: header and redefine problem Pin
Toni7823-Jun-03 19:19
Toni7823-Jun-03 19:19 
There could be cases (that I am not aware of) where you can use #if and #define but these preprocessor directives are used with constants.
"The extern keyword declares a variable or function and specifies that it has external linkage (its name is visible from files other than the one in which it's defined). When modifying a variable, extern specifies that the variable has static duration (it is allocated when the program begins and deallocated when the program ends). The variable or function may be defined in another source file, or later in the same file...(MSDN)". (You are not declaring variables or functions. You are defining classes.)
All you are doing in your code is making the compiler believe that the class exists, and then later you define that class somewhere else. There is nothing wrong with that and again as Ryan said that is the only solution. What you are doing is perfectly acceptable.

// Afterall, I realized that even my comment lines have bugs
GeneralPreviewing video Pin
weituck23-Jun-03 17:37
weituck23-Jun-03 17:37 
GeneralRe: Previewing video Pin
Andrew Walker23-Jun-03 19:11
Andrew Walker23-Jun-03 19:11 
GeneralShowing differences in strings Pin
Jack Handy23-Jun-03 14:46
Jack Handy23-Jun-03 14:46 
QuestionHow is DSR toggled programmatically? Pin
RuchikaDhingra23-Jun-03 14:16
RuchikaDhingra23-Jun-03 14:16 
AnswerRe: How is DSR toggled programmatically? Pin
Ryan Binns23-Jun-03 16:36
Ryan Binns23-Jun-03 16:36 
GeneralGetting an Access report in a VC++ prog Pin
gnurff23-Jun-03 13:24
sussgnurff23-Jun-03 13:24 
GeneralRe: Getting an Access report in a VC++ prog Pin
basementman24-Jun-03 4:53
basementman24-Jun-03 4:53 
GeneralRe: Getting an Access report in a VC++ prog Pin
Gnurff24-Jun-03 12:35
sussGnurff24-Jun-03 12:35 
GeneralDirectX DrawText breaks W's Pin
Dave Goodman23-Jun-03 13:08
Dave Goodman23-Jun-03 13:08 
GeneralRe: DirectX DrawText breaks W's Pin
ZoogieZork23-Jun-03 16:37
ZoogieZork23-Jun-03 16:37 
GeneralScrollbar Pin
DougW4823-Jun-03 12:29
DougW4823-Jun-03 12:29 
GeneralRe: Scrollbar Pin
Ryan Binns23-Jun-03 13:34
Ryan Binns23-Jun-03 13:34 
QuestionTouch screen tools?? Pin
John P Larson23-Jun-03 12:16
John P Larson23-Jun-03 12:16 
GeneralCSplitterWnd without the separating bars Pin
Florin Ochiana23-Jun-03 11:52
Florin Ochiana23-Jun-03 11:52 
GeneralRe: CSplitterWnd without the separating bars Pin
Stlan24-Jun-03 3:06
Stlan24-Jun-03 3:06 
GeneralGetCurrentMethod Pin
RK_200023-Jun-03 11:22
RK_200023-Jun-03 11:22 
GeneralRe: GetCurrentMethod Pin
Dave Bryant23-Jun-03 11:45
Dave Bryant23-Jun-03 11:45 

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.