标签:
1,检查指针是否有效,即是否为NULL
1 void OutputMaxAndMin(int * pInputInteger, int InputNum, int * pMaxValue, int * pMaxNum, int * pMinValue, int * pMinNum) 2 { 3 /*在这里实现功能*/ 4 int i = 0; 5 int num = 0; 6 if (InputNum <= 0 || pInputInteger == NULL) 7 { 8 *pMaxNum =0; 9 *pMinNum = 0; 10 *pMaxValue = 0; 11 *pMinValue = 0; 12 return; 13 } 14 15 ..... 16 }
标签:
原文地址:http://www.cnblogs.com/wanghui390/p/4186954.html