随笔分类 -  C++

摘要:#include #include int main(void){ char s[]="123456789"; char d[]="123"; strcpy(d,s); printf("%s,%s",d,s); return 0;}结果:123456789,56789解析:在内存中分配如下... 阅读全文
posted @ 2015-08-26 16:06 striver_zhu 阅读(171) 评论(0) 推荐(0)
摘要:转自:drzy#http://www.cnblogs.com/dzry/archive/2011/05/12/2044835.html在说指向指针的指针之前,不得不说指向变量的指针。先看如下示例:1. 指向整型指针先看如下示例: 1 #include 2 using namespace std; ... 阅读全文
posted @ 2015-07-19 12:51 striver_zhu 阅读(323) 评论(0) 推荐(0)
摘要://str为需要截断的string,pattern为分隔符std::vector split(std::string str,std::string pattern) { std::string::size_type pos; std::vector result; str+=patt... 阅读全文
posted @ 2015-07-17 10:25 striver_zhu 阅读(11721) 评论(0) 推荐(0)
摘要:注:需要在windows xp下才可以使用Windows Media Player插件,在windows 7下面会找不到该插件。1.Windows Media Player控件的主要方法:1)GetMute:获得静音属性2)GetPlayState:获得播放状态3)GetVolume:获得音量4)O... 阅读全文
posted @ 2015-05-22 19:53 striver_zhu 阅读(1240) 评论(0) 推荐(0)
摘要:建立一个连接数据库的类:1.头文件:ADOConn.h#import "C:\Program Files\Common Files\System\ado\msado15.dll" no_namespace rename("EOF","adoEOF")rename("BOF","adoBOF") c... 阅读全文
posted @ 2015-05-22 19:32 striver_zhu 阅读(1280) 评论(0) 推荐(0)
摘要:1.使用套接字函数之前,先要加载套接字函数库: #include "Winsock2.h" #pragma comment(lib,"Ws2_32.lib")2.相关函数介绍:1)socket函数:socket函数用于创建一个套接字。语法如下:SOCKET socket(int af,i... 阅读全文
posted @ 2015-05-22 10:27 striver_zhu 阅读(890) 评论(0) 推荐(0)
摘要:1.下载Htmlcxx,http://sourceforge.net/projects/htmlcxx/2.解压htmlcxx-0.85.tar.gz3.打开htmlcxx.vcproj,注意是htmlcxx.vcproj,不是下面的htmlcxxapp.vcproj4.使用VS打开htmlcxx.... 阅读全文
posted @ 2015-04-23 21:08 striver_zhu 阅读(10450) 评论(0) 推荐(1)
摘要:分析:strcasecmp(*,*)是用来比较字符串,定义在string.h头文件中,但是在windows下即使添加string.h头文件,依然会报错。解决:添加#ifdefined(_MSC_VER)#definestrcasecmp_stricmp#endif 阅读全文
posted @ 2015-04-23 20:45 striver_zhu 阅读(2790) 评论(0) 推荐(0)
摘要:error:1>vtkCommon.lib(vtkDebugLeaksManager.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(cloudviewer.obj 中)错误原因:Debug使用了Release的库... 阅读全文
posted @ 2015-04-23 20:41 striver_zhu 阅读(1953) 评论(0) 推荐(0)