看板 Soft_Job 關於我們 聯絡資訊
※ 引述《yoco315 (眠月)》之銘言: : ※ 引述《hanck ( )》之銘言: : : void main(int n) : : { : : if n==33 execute func1; : : if n==67 execute func2; : : if n==324 execute func3; : : if n==231 execute func4; : : if n==687 execute func5; : : } : void 麵 () { : void (*f[8])() = { 0, func1, 0, func2, func3, func4, 0, func5 } ; : f[n%8]() ; : } extern void f1(void); extern void f2(void); extern void f3(void); extern void f4(void); extern void f5(void); int main(int n) { static void (*x[16])(void) = { [1] = f1, [3] = f2, [4] = f3, [7] = f4, [15] = f5 }; x[n % 16](); } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.123.225.77