return -1 、return 1 、 return 0 的区别

根据所定义函数的需求返回不同的值。 

一般0和-1或者0和1使用 

0和-1使用时: 
0一般表示成功执行 
-1一般表示不成功 

0和1使用时: 
1真 
0假

猜你喜欢

转载自www.cnblogs.com/cnn1/p/10548072.html