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

C / C++ / MFC

 
GeneralRe: function pointer array problem Pin
CastleIsle22-Feb-06 5:18
CastleIsle22-Feb-06 5:18 
AnswerRe: function pointer array problem Pin
Roger Stoltz22-Feb-06 5:53
Roger Stoltz22-Feb-06 5:53 
GeneralRe: function pointer array problem Pin
CastleIsle22-Feb-06 10:15
CastleIsle22-Feb-06 10:15 
AnswerRe: function pointer array problem Pin
Roger Stoltz21-Feb-06 22:35
Roger Stoltz21-Feb-06 22:35 
GeneralRe: function pointer array problem Pin
CastleIsle22-Feb-06 5:04
CastleIsle22-Feb-06 5:04 
AnswerRe: function pointer array problem Pin
Roger Stoltz22-Feb-06 5:23
Roger Stoltz22-Feb-06 5:23 
GeneralRe: function pointer array problem Pin
CastleIsle22-Feb-06 5:48
CastleIsle22-Feb-06 5:48 
AnswerRe: function pointer array problem Pin
Roger Stoltz22-Feb-06 6:30
Roger Stoltz22-Feb-06 6:30 
CastleIsle wrote:
#if !defined(gobbledygook)
#define gobbledygook
// definitions here
#endif


OMG | :OMG:
When the next source file in the build process is built, the definition above is undefined. If you declare a class and plan to use it in more than one file, you have to include the header file with the class declaration in every file that uses the class in question, otherwise the class will be undefined.
Each source file is compiled separately and for each source file an object file (.obj) will be generated. The linker will link the object files together and build the executable. There is no mysterious way for the compiler to guess what was declared/defined when the last file was compiled.
(Sorry, but I consider this basic C/C++ knowledge...)

CastleIsle wrote:
I have also tried defining the function pointer array in the source file and the MFC compiler still objects to initialization.


Yep, but that's because you're doing it wrong. See my previous post on your reply to Cedric about how to deal with arrays of function pointers to member functions.

CastleIsle wrote:
I wish you were right.


I am right. Cool | :cool:


Rose | [Rose]
--
Roger


It's supposed to be hard, otherwise anybody could do it!
Questionhow to get long file name (instead of old 8.3 notation) Pin
csc21-Feb-06 19:20
csc21-Feb-06 19:20 
AnswerRe: how to get long file name (instead of old 8.3 notation) Pin
Stephen Hewitt21-Feb-06 19:30
Stephen Hewitt21-Feb-06 19:30 
GeneralRe: how to get long file name (instead of old 8.3 notation) Pin
csc21-Feb-06 19:42
csc21-Feb-06 19:42 
QuestionHelp for Arabic/Urdu Development in Visual C++ Pin
signbit21-Feb-06 18:51
signbit21-Feb-06 18:51 
AnswerRe: Help for Arabic/Urdu Development in Visual C++ Pin
Rajesh R Subramanian21-Feb-06 19:00
professionalRajesh R Subramanian21-Feb-06 19:00 
AnswerRe: Help for Arabic/Urdu Development in Visual C++ Pin
Malli_S21-Feb-06 19:23
Malli_S21-Feb-06 19:23 
GeneralRe: Help for Arabic/Urdu Development in Visual C++ Pin
signbit21-Feb-06 19:39
signbit21-Feb-06 19:39 
GeneralRe: Help for Arabic/Urdu Development in Visual C++ Pin
Giannakakis Kostas22-Feb-06 1:43
professionalGiannakakis Kostas22-Feb-06 1:43 
Questionany predefined function to convert string to int Pin
namaskaaram21-Feb-06 18:27
namaskaaram21-Feb-06 18:27 
AnswerRe: any predefined function to convert string to int Pin
Ryan Binns21-Feb-06 18:44
Ryan Binns21-Feb-06 18:44 
GeneralRe: any predefined function to convert string to int Pin
namaskaaram21-Feb-06 19:06
namaskaaram21-Feb-06 19:06 
AnswerRe: any predefined function to convert string to int Pin
Stephen Hewitt21-Feb-06 18:54
Stephen Hewitt21-Feb-06 18:54 
AnswerRe: any predefined function to convert string to int Pin
James R. Twine22-Feb-06 2:18
James R. Twine22-Feb-06 2:18 
QuestionDrawing focus rect Pin
Naveen21-Feb-06 18:18
Naveen21-Feb-06 18:18 
AnswerRe: Drawing focus rect Pin
-Dy23-Feb-06 3:05
-Dy23-Feb-06 3:05 
GeneralRe: Drawing focus rect Pin
Naveen28-Feb-06 23:47
Naveen28-Feb-06 23:47 
AnswerRe: Drawing focus rect Pin
Nibu babu thomas26-Feb-06 16:54
Nibu babu thomas26-Feb-06 16:54 

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.