关于return的函数返回值的问题
快乐汉子 2014-04-08 09:18:10
各位版主好,小菜最近在学习一个相机的SDK开发包,发现一个问题需要咨询前辈
typedef int BGAPI_RESULT;
#define BGAPI_RESULT_FAIL 0
BGAPI_RESULT res = BGAPI_RESULT_FAIL;
res = BGAPI::countSystems( &system_count );
上面的BGAPI::countSystems()函数的定义如下:/**
\fn BGAPI_RESULT countSystems( int * count )
\brief Function category: Entry Point.
\brief Count the numer of available BGAPI systems.
\param 'count' (OUT) The numer of available BGAPI systems.
\retval 'BGAPI_RESULT_OK' No error.
*/
inline BGAPI_RESULT countSystems( int * count ) { return BGAPI_countSystems( count ); }
BGAPI_DECL BGAPI_RESULT BGAPICALL BGAPI_countSystems( int * count );
请问如果res = BGAPI::countSystems( &system_count ); 这个语句执行以后,里面的count值为3时(按照SDK里面的系统数量为3时),res是等于1还是等于3?