We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear all, Who can help me the following question. I had wrote three routine,such as: void p1(void) { printf("1!\n"); } void p2(void) { printf("2!\n"); } void p3(void) { printf("3!\n"); } than I new a pointer and a func arrary for these func, void (code* pfun1)(void); //the pointer void (code* cFunc[])(void) = //the array { p1, p2, p3 }; then call the routine with the pointer in main routine, main() { while(1) { unsigned char i; for(i = 0 ; i < 3 ; i++) (*(cFunc+i))(); } } but the result is only execute the p1 routine,Then I think the i should be change to another type same as cFunc,So I had change the i data type as --> void (code*)(void) i; but the result is still error,who can told me how can let the routine execute corretly? Thanks a lot.
There is an important App Note that you need to read, and several knowledgebase articles - use the 'Search'