char *CreatA4(char *buf,unsigned long tgtID,unsigned long srcID)
{
char pbuf[]="";
........
return pbuf;
}
这样程序会提示address of local variable 'pbuf' returned,
因为这个函数调用后,会释放,这块地址也会指向其他内容,或者乱码,所以很危险,没有达到自己想要的结果
char *CreatA4(char *buf,unsigned long tgtID,unsigned long srcID)
{
char pbuf[]="";
........
return pbuf;
}
因为这个函数调用后,会释放,这块地址也会指向其他内容,或者乱码,所以很危险,没有达到自己想要的结果