刘继才

导航

 

2014年3月19日

摘要: C++ dll调用-动态(显式)今天尝试写了一个简单的C++DLL,并且用另一个CPP调用它,啥都不说,先贴代码1.DLL(冒泡算法)复制代码extern "C"_declspec(dllexport) void maopao(int *p,int count);void maopao(int *p,int count){ int temp=0; for(int i=1;i=i;j--) { if(p[j]>p[j-1]) {temp=p[j]; p[j]=p[j-1]; p[j-1]=temp; } } }}复制代码2.调用DLL复制代码#include#inclu 阅读全文
posted @ 2014-03-19 13:19 刘继才 阅读(226) 评论(0) 推荐(0) 编辑
 
摘要: sql转行的一个例子(转) sqlserver把行转成列在我们编码中是经常遇到的我做一个小例子大家看一下1 --创建一个表2 create table PayPhoneMoney3 (4 id int identity(1,1),5 userName Nvarchar(20),6 payType nvarchar(20),7 money decimal,8 payTime datetime,9 constraint pk_id primary key(id)10 )11 --插入点数据12 insert into PayPhoneMoney values('小李','支 阅读全文
posted @ 2014-03-19 13:18 刘继才 阅读(240) 评论(0) 推荐(0) 编辑