不,您只能返回一个对象.但是,您可以返回结构类型对象,并且可以将"多个返回"放入结构中:
typedef struct return_type
{
void* pointer_; // You should, of course, use whatever the appropriate types
char* string_; // are for the objects that you are trying to return.
};
return_type f();
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
387 次 |
最近记录: |