int main()
{
int a = 1;
void* b;
int c;
b = (void *)&a;
c = *((int *)b);
std::cout << "value of c: " << c << std::endl;
return 0;
}
非指针数据通过void *指针转换
猜你喜欢
转载自blog.csdn.net/baidu_38410526/article/details/102745950
今日推荐
周排行