16,472
社区成员
发帖
与我相关
我的任务
分享
memcpy(lpAddr,12345,4); //12345非内存地址
//需要实现的是将 12345这个数值,写入lpAddr地址中,
//不能另外申明变量
//也不能在第2个参数中借用lpAddr这个变量
//在12345这个前面要用什么符号进行转换才能实现呢??
//int hiByte = HIBYTE(12345);
//int loByte = LOBYTE(12345);
memcpy(lpAddr, (const int*)("90"), sizeof(int)/2);
memcpy(&dwVal,testfun,4); //testfun是函数名,如果想要把testfun的函数地址写进dwVal中去,可以转吗?
也仅限使用memcpy