typedef void (*PF)();
void SetPortFoo1()
{
}
void SetPortFoo2()
{
}
void SetPortFoo3()
{
}
int _tmain(int argc, _TCHAR* argv[])
{
PF yourFunctionArray[] = {SetPortFoo1, SetPortFoo2, SetPortFoo3};
yourFunctionArray[0](); // call SetPortFoo1()
yourFunctionArray[1](); // call SetPortFoo2()
yourFunctionArray[2](); // call SetPortFoo3()
and so on