Click here to Skip to main content
15,891,607 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ Array Of Function Pointers problem Pin
CNewbie16-Jun-05 5:54
CNewbie16-Jun-05 5:54 
GeneralRe: C++ Array Of Function Pointers problem Pin
David Crow16-Jun-05 6:11
David Crow16-Jun-05 6:11 
GeneralRe: C++ Array Of Function Pointers problem Pin
CNewbie16-Jun-05 6:13
CNewbie16-Jun-05 6:13 
GeneralRe: C++ Array Of Function Pointers problem Pin
David Crow16-Jun-05 6:21
David Crow16-Jun-05 6:21 
GeneralRe: C++ Array Of Function Pointers problem Pin
CNewbie16-Jun-05 6:34
CNewbie16-Jun-05 6:34 
GeneralRe: C++ Array Of Function Pointers problem Pin
David Crow16-Jun-05 7:06
David Crow16-Jun-05 7:06 
GeneralRe: C++ Array Of Function Pointers problem Pin
CNewbie16-Jun-05 7:46
CNewbie16-Jun-05 7:46 
GeneralRe: C++ Array Of Function Pointers problem Pin
David Crow16-Jun-05 8:24
David Crow16-Jun-05 8:24 
if call_cmd_function, call_ins_function, doins00, and doins5C are all static members, why put them in a class at all? That's seems to make things unnecessarily complicated. Does this work:

class CflowlogDlg
{
    public:
 
    static void Func1( void )
    {
        cout << "Func1()" << endl;
    }
 
    static void Func2( void )
    {
        cout << "Func2()" << endl;
    }
 
    static void Func3( void )
    {
        cout << "Func3()" << endl;
    }
};
    
void (*call_cmd_function[3])(void);
 
void main( void )
{
    call_cmd_function[0] = CflowlogDlg::Func1;
    call_cmd_function[1] = CflowlogDlg::Func2;
    call_cmd_function[2] = CflowlogDlg::Func3;
 
    (*call_cmd_function[2])();
    (*call_cmd_function[1])();
    (*call_cmd_function[0])();
}
Now you can reference call_cmd_function[] from other files, too.


"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown


GeneralRe: C++ Array Of Function Pointers problem Pin
CNewbie16-Jun-05 8:46
CNewbie16-Jun-05 8:46 
GeneralRe: C++ Array Of Function Pointers problem Pin
David Crow16-Jun-05 8:49
David Crow16-Jun-05 8:49 
GeneralRe: C++ Array Of Function Pointers problem Pin
coadtoad13-Jun-05 6:23
coadtoad13-Jun-05 6:23 
GeneralRe: C++ Array Of Function Pointers problem Pin
CNewbie13-Jun-05 11:49
CNewbie13-Jun-05 11:49 
GeneralRe: C++ Array Of Function Pointers problem Pin
coadtoad14-Jun-05 5:58
coadtoad14-Jun-05 5:58 
GeneralAccess variables in CMyView Pin
hcmuns12-Jun-05 17:26
susshcmuns12-Jun-05 17:26 
GeneralRe: Access variables in CMyView Pin
PJ Arends12-Jun-05 17:38
professionalPJ Arends12-Jun-05 17:38 
GeneralRe: Access variables in CMyView Pin
hcmuns12-Jun-05 17:49
susshcmuns12-Jun-05 17:49 
GeneralRe: Access variables in CMyView Pin
Tom Archer12-Jun-05 18:22
Tom Archer12-Jun-05 18:22 
GeneralRe: Access variables in CMyView Pin
hcmuns12-Jun-05 21:21
susshcmuns12-Jun-05 21:21 
GeneralRe: Access variables in CMyView Pin
hcmuns12-Jun-05 22:41
susshcmuns12-Jun-05 22:41 
QuestionDoes anyone know RLC? Pin
Member 199230312-Jun-05 17:12
Member 199230312-Jun-05 17:12 
GeneralMessage forwarding.... Pin
dobrzan12-Jun-05 11:20
dobrzan12-Jun-05 11:20 
GeneralSimple grid in a view Pin
scientist4712-Jun-05 10:22
scientist4712-Jun-05 10:22 
GeneralReturning a value from a Worker Thread Pin
Steve Messer12-Jun-05 8:41
Steve Messer12-Jun-05 8:41 
GeneralRe: Returning a value from a Worker Thread Pin
DavidR_r12-Jun-05 9:38
DavidR_r12-Jun-05 9:38 
GeneralRe: Returning a value from a Worker Thread Pin
Steve Messer12-Jun-05 10:29
Steve Messer12-Jun-05 10:29 

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.