To make it generic, you simply divide the sizeof the array by the sizeof the type: for(int i=0; i<sizeof(controls)/sizeof(SwitchControl); ...
確定! 回上一頁