Click here to Skip to main content
12,634,982 members (25,234 online)

C / C++ / MFC

 
QuestionRe: How to create an uncompressed avi file from a matrix of data? Pin
CPallini27-Jan-13 23:38
mvpCPallini27-Jan-13 23:38 
AnswerRe: How to create an uncompressed avi file from a matrix of data? Pin
Kiran Satish28-Jan-13 5:42
memberKiran Satish28-Jan-13 5:42 
AnswerRe: How to create an uncompressed avi file from a matrix of data? Pin
Chris Losinger28-Jan-13 6:10
memberChris Losinger28-Jan-13 6:10 
AnswerRe: How to create an uncompressed avi file from a matrix of data? Pin
Vaclav_Sal28-Jan-13 10:50
memberVaclav_Sal28-Jan-13 10:50 
AnswerRe: How to create an uncompressed avi file from a matrix of data? Pin
Max_Power_Up26-Feb-13 6:51
memberMax_Power_Up26-Feb-13 6:51 
QuestionWaveInOpen() returns error code 11 Pin
AmbiguousName26-Jan-13 4:14
memberAmbiguousName26-Jan-13 4:14 
AnswerRe: WaveInOpen() returns error code 11 Pin
Richard MacCutchan26-Jan-13 4:28
mvpRichard MacCutchan26-Jan-13 4:28 
QuestionStuck with function pointers in C and C++ Pin
Simon Langdon25-Jan-13 1:38
memberSimon Langdon25-Jan-13 1:38 
I'm trying to copy some C code to a C++ class and I've got stuck with a function pointer issue. I've been trying to mess around with calling conventions but I don't want to make my C++ function static and don't want to change the old C code. Thanks for looking.


class theClass
{
public:
    int theFunction(int theParam1);
    int anotherFunction(void);
};

typedef int (*funcPtr) (int Param1);

int theClass::theFunction(int theParam1)
{
    return 0;
}

int function(int theParam1)
{
    return 0;
}

bool globFunction (funcPtr aFunction, bool someOtherArg)
{
    int anArg = 0;
    int ret = aFunction(anArg);
    return true;
}

int theClass::anotherFunction(void)
{
    globFunction (function, false);

    globFunction (&theClass::theFunction, true); //  error C2440: 'type cast' : cannot convert from 'int (__thiscall theClass::* )(int)' to 'funcPtr'

    return 0;
}

AnswerRe: Stuck with function pointers in C and C++ Pin
CPallini25-Jan-13 1:59
mvpCPallini25-Jan-13 1:59 
AnswerRe: Stuck with function pointers in C and C++ Pin
Freak3025-Jan-13 2:08
memberFreak3025-Jan-13 2:08 
GeneralRe: Stuck with function pointers in C and C++ Pin
Simon Langdon25-Jan-13 2:41
memberSimon Langdon25-Jan-13 2:41 
GeneralRe: Stuck with function pointers in C and C++ Pin
Stefan_Lang29-Jan-13 1:02
memberStefan_Lang29-Jan-13 1:02 
GeneralRe: Stuck with function pointers in C and C++ Pin
Simon Langdon29-Jan-13 1:38
memberSimon Langdon29-Jan-13 1:38 
GeneralRe: Stuck with function pointers in C and C++ Pin
Stefan_Lang29-Jan-13 5:31
memberStefan_Lang29-Jan-13 5:31 
GeneralRe: Stuck with function pointers in C and C++ Pin
CPallini25-Jan-13 3:04
mvpCPallini25-Jan-13 3:04 
GeneralRe: Stuck with function pointers in C and C++ Pin
Freak3028-Jan-13 0:30
memberFreak3028-Jan-13 0:30 
AnswerRe: Stuck with function pointers in C and C++ Pin
Stephen Hewitt27-Jan-13 5:40
memberStephen Hewitt27-Jan-13 5:40 
QuestionUSB Device Path Handle Problem Pin
yogeshs24-Jan-13 22:21
memberyogeshs24-Jan-13 22:21 
AnswerRe: USB Device Path Handle Problem Pin
Vaclav_Sal28-Jan-13 11:08
memberVaclav_Sal28-Jan-13 11:08 
QuestionHow to create a button on the right of the screen in mfc.? Pin
mbatra3124-Jan-13 20:53
membermbatra3124-Jan-13 20:53 
AnswerRe: How to create a button on the right of the screen in mfc.? Pin
Richard MacCutchan24-Jan-13 23:47
mvpRichard MacCutchan24-Jan-13 23:47 
GeneralRe: How to create a button on the right of the screen in mfc.? Pin
mbatra3127-Jan-13 20:39
membermbatra3127-Jan-13 20:39 
GeneralRe: How to create a button on the right of the screen in mfc.? Pin
Richard MacCutchan27-Jan-13 23:36
mvpRichard MacCutchan27-Jan-13 23:36 
GeneralRe: How to create a button on the right of the screen in mfc.? Pin
mbatra3128-Jan-13 1:07
membermbatra3128-Jan-13 1:07 
AnswerRe: How to create a button on the right of the screen in mfc.? Pin
Iain Clarke, Warrior Programmer25-Jan-13 0:13
memberIain Clarke, Warrior Programmer25-Jan-13 0:13 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.161208.2 | Last Updated 9 Dec 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid