Click here to Skip to main content
15,921,660 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalcommunicating with the phone Pin
mpsundar8-Jul-05 1:16
mpsundar8-Jul-05 1:16 
GeneralRe: communicating with the phone Pin
ThatsAlok8-Jul-05 20:23
ThatsAlok8-Jul-05 20:23 
QuestionHow to Get Public IP Address Pin
Member 1256658-Jul-05 0:44
Member 1256658-Jul-05 0:44 
AnswerRe: How to Get Public IP Address Pin
Alexander M.,8-Jul-05 4:00
Alexander M.,8-Jul-05 4:00 
AnswerRe: How to Get Public IP Address Pin
cmk8-Jul-05 11:07
cmk8-Jul-05 11:07 
GeneralRe: How to Get Public IP Address Pin
Member 12566510-Jul-05 19:10
Member 12566510-Jul-05 19:10 
GeneralRe: How to Get Public IP Address Pin
cmk10-Jul-05 22:06
cmk10-Jul-05 22:06 
Questionhow to declare and use an array of pointer on functions? Pin
bouli8-Jul-05 0:28
bouli8-Jul-05 0:28 
Hello people,

I'd like to know how to declare and use an array of pointer on functions?

Lets say:
<br />
void f1() { ... }<br />
void f2() { ... }<br />
void f3() { ... }<br />
<br />
typedef struct _toto<br />
{<br />
  int    x, y;<br />
  //how to declare my array of pointers  functions[3];<br />
} TOTO;<br />
<br />
TOTO g_toto;<br />
<br />
void InitTOTO()<br />
{<br />
  g_toto.x=g_toto.y=0;<br />
<br />
  // how to initialize my array of pointers on functions?<br />
  g_toto.functions[0]=f1;<br />
  g_toto.functions[1]=f2;<br />
  g_toto.functions[3]=f3;    <br />
}<br />
<br />
int main()<br />
{<br />
   InitTOTO();<br />
   for (int i=0; i<3; i++)<br />
     //how to call g_toto.functions[i]()<br />
}<br />


I hope you see what I wish to do...

Thanks for giving me the clue Smile | :)

Best regards.

Fred.


There is no spoon.
AnswerRe: how to declare and use an array of pointer on functions? Pin
Cedric Moonen8-Jul-05 1:15
Cedric Moonen8-Jul-05 1:15 
GeneralRe: how to declare and use an array of pointer on functions? Pin
t!bast8-Jul-05 1:29
t!bast8-Jul-05 1:29 
AnswerRe: how to declare and use an array of pointer on functions? Pin
David Crow8-Jul-05 3:40
David Crow8-Jul-05 3:40 
GeneralCommand Handler problem in Dialog Pin
ugur_basak7-Jul-05 22:42
ugur_basak7-Jul-05 22:42 
GeneralRe: Command Handler problem in Dialog Pin
Jose Lamas Rios8-Jul-05 3:10
Jose Lamas Rios8-Jul-05 3:10 
GeneralRe: Command Handler problem in Dialog Pin
ugur_basak8-Jul-05 3:28
ugur_basak8-Jul-05 3:28 
Questionhow to protect files like this? Pin
szcococut7-Jul-05 22:24
szcococut7-Jul-05 22:24 
AnswerRe: how to protect files like this? Pin
khan++7-Jul-05 23:34
khan++7-Jul-05 23:34 
GeneralRe: how to protect files like this? Pin
toxcct8-Jul-05 0:51
toxcct8-Jul-05 0:51 
GeneralRe: how to protect files like this? Pin
khan++8-Jul-05 1:21
khan++8-Jul-05 1:21 
GeneralRe: how to protect files like this? Pin
toxcct8-Jul-05 1:27
toxcct8-Jul-05 1:27 
GeneralRe: how to protect files like this? Pin
khan++8-Jul-05 1:54
khan++8-Jul-05 1:54 
AnswerRe: how to protect files like this? Pin
David Crow8-Jul-05 3:46
David Crow8-Jul-05 3:46 
GeneralCView: Change background color Pin
a_du7-Jul-05 22:12
a_du7-Jul-05 22:12 
GeneralRe: CView: Change background color Pin
khan++7-Jul-05 23:56
khan++7-Jul-05 23:56 
GeneralRe: CView: Change background color Pin
Anonymous10-Jul-05 0:13
Anonymous10-Jul-05 0:13 
GeneralRe: CView: Change background color Pin
TuPacMansur7-Jul-10 13:27
TuPacMansur7-Jul-10 13:27 

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.