我有以下代码:
char* gen()
{
char out[256];
sprintf(out, ...); // you don't need to know what's in here I don't think
return out;
}
当我尝试编译时出现此错误:
ERROR: function returns address of local variable
我试过有这个回报率char[],并char没有运气。我想念什么吗?
陪伴而非守候
叮当猫咪
茅侃侃
皈依舞
随时随地看视频慕课网APP
相关分类