#include<iostream>
using namespace std;
int i =0;
void init_cpu()
{
cout<<++i<<" "<<__func__<<endl;
}
void init_serial()
{
cout<<++i<<" "<<__func__<<endl;
}
void init_usb()
{
cout<<++i<<" "<<__func__<<endl;
}
void init_sd()
{
cout<<++i<<" "<<__func__<<endl;
}
void init_camera()
{
cout<<++i<<" "<<__func__<<endl;
}
typedef void(*INITF)();
INITF initf[]={
init_cpu,init_serial,
init_usb,init_camera,NULL
};
int intf[]={1,2,3,4,0};
int main()
{
INITF * p = initf;
for(;*p;p++)
(*p)();
int * k = intf;
for(;*k;k++)
cout<<*k<<" ";
cout<<endl;
return 0;
}