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

C / C++ / MFC

 
GeneralRe: defining a function with #define Pin
coco2433-Aug-22 9:01
coco2433-Aug-22 9:01 
QuestionHow to read an xlsx file using CDatabase Pin
Sampath57927-Jul-22 19:54
Sampath57927-Jul-22 19:54 
AnswerRe: How to read an xlsx file using CDatabase Pin
Victor Nijegorodov27-Jul-22 20:07
Victor Nijegorodov27-Jul-22 20:07 
GeneralRe: How to read an xlsx file using CDatabase Pin
Sampath57931-Jul-22 23:27
Sampath57931-Jul-22 23:27 
GeneralRe: How to read an xlsx file using CDatabase Pin
Richard MacCutchan31-Jul-22 23:38
mveRichard MacCutchan31-Jul-22 23:38 
AnswerMessage Closed Pin
31-Jul-22 17:19
Sampath57931-Jul-22 17:19 
GeneralRe: How to read an xlsx file using CDatabase Pin
Dave Kreskowiak31-Jul-22 17:30
mveDave Kreskowiak31-Jul-22 17:30 
GeneralRe: How to read an xlsx file using CDatabase Pin
Sampath57931-Jul-22 23:40
Sampath57931-Jul-22 23:40 
GeneralRe: How to read an xlsx file using CDatabase Pin
Sampath5791-Aug-22 23:21
Sampath5791-Aug-22 23:21 
QuestionHow to use UTF8 characters in C++ Pin
JohnCodding27-Jul-22 3:00
JohnCodding27-Jul-22 3:00 
AnswerRe: How to use UTF8 characters in C++ Pin
Mircea Neacsu27-Jul-22 3:54
Mircea Neacsu27-Jul-22 3:54 
GeneralRe: How to use UTF8 characters in C++ Pin
JohnCodding27-Jul-22 19:40
JohnCodding27-Jul-22 19:40 
AnswerRe: How to use UTF8 characters in C++ Pin
Richard MacCutchan27-Jul-22 4:40
mveRichard MacCutchan27-Jul-22 4:40 
QuestionI Moved this question to the proper forum "Managed C++/CLI" - Sorry for posting in the wrong place :¬) Pin
madusmacus27-Jul-22 2:33
madusmacus27-Jul-22 2:33 
AnswerRe: I hope there is a Managed C++/CLR person left to help me with Parallel::For Pin
Victor Nijegorodov27-Jul-22 4:02
Victor Nijegorodov27-Jul-22 4:02 
GeneralRe: I hope there is a Managed C++/CLR person left to help me with Parallel::For Pin
madusmacus27-Jul-22 4:24
madusmacus27-Jul-22 4:24 
QuestionUpgrade my skills... Pin
Kornfeld Eliyahu Peter21-Jul-22 0:45
professionalKornfeld Eliyahu Peter21-Jul-22 0:45 
AnswerRe: Upgrade my skills... Pin
Richard MacCutchan21-Jul-22 1:00
mveRichard MacCutchan21-Jul-22 1:00 
PraiseRe: Upgrade my skills... Pin
Kornfeld Eliyahu Peter21-Jul-22 1:12
professionalKornfeld Eliyahu Peter21-Jul-22 1:12 
GeneralRe: Upgrade my skills... Pin
Richard MacCutchan21-Jul-22 1:21
mveRichard MacCutchan21-Jul-22 1:21 
GeneralRe: Upgrade my skills... Pin
charlieg7-May-23 5:18
charlieg7-May-23 5:18 
GeneralRe: Upgrade my skills... Pin
Richard MacCutchan7-May-23 7:40
mveRichard MacCutchan7-May-23 7:40 
AnswerRe: Upgrade my skills... Pin
Graham Breach21-Jul-22 6:42
Graham Breach21-Jul-22 6:42 
PraiseRe: Upgrade my skills... Pin
Kornfeld Eliyahu Peter21-Jul-22 7:07
professionalKornfeld Eliyahu Peter21-Jul-22 7:07 
Questionpointers to functions Pin
Calin Negru16-Jul-22 0:28
Calin Negru16-Jul-22 0:28 
How do you use a pointer to a function that is declared in the general scope within a class.
Do you pass the pointer as parameter to class function, save the pointer as a class member and then use the class member in a class function when needed?



C++
void somefunction(int i);
void (*pointertosomef)(int i) = somefunction;

class SomeObject
{
void (*m_pointertosomef)(int i);
public:
void ImportPointerToF(void (*pointertosomef)(int i));
void UsePointerToF();
}

void SomeObject::ImportPointerToF(void (*pointertosomef)(int i))
{
m_pointertosomef = pointertosomef;
}
void SomeObject::UsePointerToF()
{
 m_pointertosomef(30);
}


I found on the internet the basic version of declaring a pointer function
C++
void fun(int a);

void (*fun_ptr)(int) = fun;  
  
    fun_ptr(10);

Everything else is my speculation

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.