Click here to Skip to main content
15,912,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to access Cell Phone (ie: Nokia) via Irda from PC ? Pin
Peter Molnar4-Jan-04 18:41
Peter Molnar4-Jan-04 18:41 
GeneralCalling C++ code from C Pin
peterchen16-Dec-03 22:04
peterchen16-Dec-03 22:04 
GeneralRe: Calling C++ code from C Pin
Prakash Nadar16-Dec-03 23:49
Prakash Nadar16-Dec-03 23:49 
GeneralRe: Calling C++ code from C Pin
peterchen17-Dec-03 8:12
peterchen17-Dec-03 8:12 
GeneralRe: Calling C++ code from C Pin
Anthony_Yio17-Dec-03 0:39
Anthony_Yio17-Dec-03 0:39 
GeneralRe: Calling C++ code from C Pin
John M. Drescher17-Dec-03 4:21
John M. Drescher17-Dec-03 4:21 
GeneralRe: Calling C++ code from C Pin
Prakash Nadar17-Dec-03 16:03
Prakash Nadar17-Dec-03 16:03 
GeneralRe: Calling C++ code from C Pin
Dinesh Ahuja17-Dec-03 16:45
Dinesh Ahuja17-Dec-03 16:45 
This will help you in accessing the static member function of C++ in C.

//Test1.cpp

#include <iostream.h>
typedef int (* pFunc) (int,int);

class D {
public :
static int Calculate(int iNum1,int iNum2);
};`

extern "C" {
int D::Calculate(int iNum1, int iNum2) { return iNum1 + iNum2; }
pFunc p = D::Calculate;
}

// Test.c

#include <stdio.h>
typedef int (* pFunc) (int,int);

extern pFunc p;

int main() {
int iResult = (*p)(10,20);
printf("Value is %d",iResult);
return 0;
}

Hope this will help you!

Regards
Dinesh
Generalid3 tag for wma file Pin
qdping16-Dec-03 22:01
qdping16-Dec-03 22:01 
GeneralDerived CFrameWnd and attaching a View with it. Pin
Dinesh Ahuja16-Dec-03 21:59
Dinesh Ahuja16-Dec-03 21:59 
GeneralI really need help here! guru plz help Pin
YaronNir16-Dec-03 21:48
YaronNir16-Dec-03 21:48 
GeneralRe: I really need help here! guru plz help Pin
sam India16-Dec-03 22:06
sam India16-Dec-03 22:06 
GeneralRe: I really need help here! guru plz help Pin
YaronNir16-Dec-03 22:13
YaronNir16-Dec-03 22:13 
GeneralRe: I really need help here! guru plz help Pin
sam India16-Dec-03 22:48
sam India16-Dec-03 22:48 
GeneralRe: I really need help here! guru plz help Pin
YaronNir16-Dec-03 22:54
YaronNir16-Dec-03 22:54 
GeneralRe: I really need help here! guru plz help Pin
sam India16-Dec-03 23:58
sam India16-Dec-03 23:58 
GeneralRe: I really need help here! guru plz help Pin
YaronNir17-Dec-03 1:10
YaronNir17-Dec-03 1:10 
GeneralProblems recompiling under VC.Net Pin
James Spibey16-Dec-03 21:32
James Spibey16-Dec-03 21:32 
GeneralRe: Problems recompiling under VC.Net Pin
Prakash Nadar16-Dec-03 21:42
Prakash Nadar16-Dec-03 21:42 
Generalmany if else if Pin
Jerome Conus16-Dec-03 21:23
Jerome Conus16-Dec-03 21:23 
GeneralRe: many if else if Pin
jhwurmbach16-Dec-03 21:32
jhwurmbach16-Dec-03 21:32 
GeneralRe: many if else if Pin
Prakash Nadar16-Dec-03 21:35
Prakash Nadar16-Dec-03 21:35 
GeneralRe: many if else if [modified] Pin
Marek Grzenkowicz16-Dec-03 23:44
Marek Grzenkowicz16-Dec-03 23:44 
GeneralRe: many if else if Pin
Ian Darling17-Dec-03 0:17
Ian Darling17-Dec-03 0:17 
GeneralRe: many if else if Pin
Ian Darling17-Dec-03 0:16
Ian Darling17-Dec-03 0:16 

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.