memcpy
memcpy_s 在VC6中不能用,只能用 memcpy
#include "stdafx.h"
#include <string.h>
int main(int argc, char* argv[])
{
short v[8];
double f = 3.134;
memcpy( (void*)(&v[0]) , (void*)&f , sizeof(f));//放入
f = *((double*)(&v[0]));//取出
printf("Hello World %f!\n",f);
return 0;
}