Click here to Skip to main content
15,899,825 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: radio button in a propertysheet Pin
Michael Schubert19-Mar-09 3:15
Michael Schubert19-Mar-09 3:15 
AnswerRe: radio button in a propertysheet Pin
#realJSOP19-Mar-09 3:33
professional#realJSOP19-Mar-09 3:33 
GeneralRe: radio button in a propertysheet Pin
Michael Schubert19-Mar-09 3:36
Michael Schubert19-Mar-09 3:36 
GeneralRe: radio button in a propertysheet Pin
#realJSOP19-Mar-09 4:53
professional#realJSOP19-Mar-09 4:53 
AnswerRe: radio button in a propertysheet [modified] Pin
Code-o-mat19-Mar-09 3:43
Code-o-mat19-Mar-09 3:43 
AnswerRe: radio button in a propertysheet Pin
Steve Mayfield19-Mar-09 6:26
Steve Mayfield19-Mar-09 6:26 
AnswerRe: radio button in a propertysheet Pin
«_Superman_»19-Mar-09 19:10
professional«_Superman_»19-Mar-09 19:10 
QuestionDoubt in function pointer Pin
Cool_Phillip19-Mar-09 2:42
Cool_Phillip19-Mar-09 2:42 
Hi All
I'm getting some error in below code. can any body tell me whats is the proboem in my code?

Test.h
---------------
class Test
{

private:
int i , j;


public:
//f pointer
int f1(int i, int j);
int f2(int i, int j);
int (*fptr)(int,int);

};

Test.cpp
-----------------
int Test::f1(int i, int j)
{
int res = i+j;
cout<<"IM IN f1 : Reult "<<res<<endl;
return res;
}
int Test::f2(int i, int j)
{
int res = i-j;
cout<<"IM IN f2 : Reult "<<res<<endl;
return res;
}

main.cpp
------------
int main()
{

Test obj;

int (*fptr)(int,int) ;
fptr = &(Test::f1);
fptr(2,1);

return 0;
}

Actually im getting error in fptr = &amp;(Test::f1); line
i.e Error 1 error C2440: '=' : cannot convert from 'int (__thiscall Test::* )(int,int)' to 'int (__cdecl *)(int,int)' c:\documents and settings\e_skanun\my documents\visual studio 2005\projects\test\test\main.cpp 35

And im nt able to correct.
plz do help.

Regards
Phillip

Regards
Phillip

AnswerRe: Doubt in function pointer [modified] Pin
Cedric Moonen19-Mar-09 2:58
Cedric Moonen19-Mar-09 2:58 
AnswerRe: Doubt in function pointer Pin
David Crow19-Mar-09 2:59
David Crow19-Mar-09 2:59 
GeneralRe: Doubt in function pointer Pin
Cool_Phillip19-Mar-09 3:08
Cool_Phillip19-Mar-09 3:08 
AnswerRe: Doubt in function pointer Pin
Stuart Dootson19-Mar-09 3:14
professionalStuart Dootson19-Mar-09 3:14 
QuestionRe: Doubt in function pointer [modified] Pin
CPallini19-Mar-09 3:48
mveCPallini19-Mar-09 3:48 
AnswerRe: Doubt in function pointer Pin
Cool_Phillip23-Mar-09 0:00
Cool_Phillip23-Mar-09 0:00 
GeneralRe: Doubt in function pointer Pin
CPallini23-Mar-09 0:08
mveCPallini23-Mar-09 0:08 
QuestionAutomated CVS-VC6 building Pin
andwan019-Mar-09 1:51
andwan019-Mar-09 1:51 
AnswerRe: Automated CVS-VC6 building Pin
David Crow19-Mar-09 2:51
David Crow19-Mar-09 2:51 
AnswerRe: Automated CVS-VC6 building Pin
led mike19-Mar-09 4:18
led mike19-Mar-09 4:18 
AnswerRe: Automated CVS-VC6 building Pin
Rolf Kristensen19-Mar-09 12:35
Rolf Kristensen19-Mar-09 12:35 
GeneralRe: Automated CVS-VC6 building Pin
andwan019-Mar-09 13:26
andwan019-Mar-09 13:26 
GeneralRe: Automated CVS-VC6 building Pin
Rolf Kristensen20-Mar-09 0:00
Rolf Kristensen20-Mar-09 0:00 
GeneralMonitoring Tool Pin
itkid19-Mar-09 1:38
itkid19-Mar-09 1:38 
GeneralRe: Monitoring Tool Pin
Stuart Dootson19-Mar-09 1:44
professionalStuart Dootson19-Mar-09 1:44 
GeneralRe: Monitoring Tool Pin
itkid19-Mar-09 1:50
itkid19-Mar-09 1:50 
GeneralRe: Monitoring Tool Pin
Stuart Dootson19-Mar-09 1:52
professionalStuart Dootson19-Mar-09 1:52 

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.