2013年7月22日
摘要: CTestThread.hpublic: CTestThread(void); ~CTestThread(void);public: void setvalue(); static DWORD _stdcall SecondThreadFunc(LPVOID lparam); //多线程测试,线程成员函数必须是静态变量,不知道为什么?第二种可以使全局函数CTestThread.cpp#include #include #include using namespace std;CTestThread::CTestThread(void){ tp.aa=14; tp.bb=124.789;}C.. 阅读全文
posted @ 2013-07-22 16:07 markygis 阅读(2362) 评论(0) 推荐(0) 编辑
摘要: //初始化内存 int *data=(int*)malloc(sizeof(int)*4); ZeroMemory(data, sizeof(int)*4); int *m=(int*)malloc(sizeof(int)); ZeroMemory(m, sizeof(int)) ; *m=789; //*****将数据写入到内存 for(int i=0;i<2;i++) { *m=198+i; memcpy((int*)data+i,m,sizeof(int)); } //******内存数据读出,输出 static char buf1[30]; //... 阅读全文
posted @ 2013-07-22 15:37 markygis 阅读(1334) 评论(0) 推荐(0) 编辑