代码如下,为什么会报错呢?
void clear(int *a) { memset(a,0,sizeof(a)); }
错误信息
warning: argument to 'sizeof' in 'void* memset(void*, int, size_t)' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]