#ifndef _SWAP_H
#define _SWAP_H
void swap(void* x,void* y,int size)
{
void* temp=(void*)malloc(size);
memcpy(temp,x,size);
memcpy(x,y,size);
memcpy(y,temp,size);
free(temp);
}
#endif /* _SWAP_H */
未指定类型(void*)的两个数交换
最新推荐文章于 2019-03-13 13:59:14 发布