![](/img/trans.png)
[英]return an array from function when dynamic argument is passed to the function in c
[英]Return from function as argument
當Create返回時,我沒有新的錯誤代碼。
typedef union {
u8* ErrorCode_u16;
} Param;
void Create(void* params)
{
Param *parameters = (Param*)params;
parameters[1].ErrorCode_u16 = Foo();
}
當創建返回時,我想在我的空指針數組中有新的錯誤代碼。
提一下
我該怎么做 ?
像這樣做
Param data[2/* or more */];
Create(data);
/* data[1] has the result of Foo() call */
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.