随笔分类 -  C/C++小技巧

摘要:一、VS2010中c++编译dll出处:http://blog.csdn.net/cc_net/article/details/5653229 在VC++下选择【WIN32】--【WIN32项目】。在应用程序向导中,选择应用程序类型为DLL,并且选择为空项目。然后添加一个.h文件和一个.cpp文件在.h中写:public static extern void XXX(char* source, char* source2); 在.cpp中正常写函数体即可。二、VS2010中C#引用dll 1. using System.Runtime.InteropServices;2. 进行声明:[DllI 阅读全文
posted @ 2012-06-25 16:44 water1417 阅读(181) 评论(0) 推荐(0)
摘要:#include <ctime> using namespace std;clock_t beginTime,endTime;beginTime=clock();...endTime=clock();(double)(endTime-beginTime)/CLOCKS_PER_SEC; //计算运行时间 阅读全文
posted @ 2012-05-28 11:14 water1417 阅读(192) 评论(0) 推荐(0)