C++之引用数组形参
当引用一个数组作为形参时:#include <iostream>void a(unsigned char (&tmp)[200]){ printf("%x\r\n",tmp); sprintf((char *)&tmp,"aaaaaa");}int main(int argc, char **argv){ unsigned char tmp[200] = {0}; printf("%x\r\n",tmp); a(tmp)
原创
2021-10-25 16:18:33 ·
1064 阅读 ·
0 评论