大约有 12,000 项符合查询结果(耗时:0.0538秒) [XML]

https://www.tsingfun.com/it/cpp/1511.html 

std::string的截取字符串的方法 - C/C++ - 清泛网 - 专注C/C++及内核技术

std::string的截取字符串的方法例如截取ip:port,代码如下:std::string ip("127.0.0.1:8888");int index = ip.find_last_of(':'); ipip.substr(0, index)....例如截取ip:port,代码如下: std::string ip("127.0.0.1:8888"); int index = ip.find_last_of(':'); //ip ip.substr(0, in...
https://www.tsingfun.com/it/cpp/1918.html 

CListCtrl 如何设置单元格颜色? - C/C++ - 清泛网 - 专注C/C++及内核技术

...各种自定义绘制。 拓展的类为CColorListCtrl,必需引入的代码:ColorListCtrl.zip(4个文件) 将源码引入工程,#include "ColorListCtrl.h",将CListCtrl换成CColorListCtrl,构造函数中指定CColorListCtrl对象的列数(这里假定CListCtrl你已经会了...
https://www.tsingfun.com/it/cpp/2041.html 

error C2804:binary \'operator +\' has too many parameters - C/C++ - 清泛网 - 专注C/C++及内核技术

... too many parameterserror C2804:binary 'operator +' has too many parameters代码如下:#include <iostream> #include <string> clas...error C2804:binary 'operator +' has too many parameters 代码如下: #include <iostream> #include <string> class Sales_item { // private...
https://www.tsingfun.com/it/cpp/2045.html 

MiniDumpWriteDump 记录dmp文件的简单实例(附调试方法) - C/C++ - 清泛网...

MiniDumpWriteDump 记录dmp文件的简单实例(附调试方法)实例代码如下:#include <DbgHelp.h>#pragma comment(lib, "Dbghelp.lib")LONG WINAPI ExceptionHandler(LPEXCEPTION_POINTERS pExce...实例代码如下: #include <DbgHelp.h> #pragma comment(lib, "Dbghelp.lib") LONG WINAPI E...
https://www.tsingfun.com/it/cpp/2092.html 

error C2440: “return”: 无法从“const Screen”转换为“Screen &” - C/...

...从“const Screen”转换为“Screen &”转换丢失限定符。出错代码(例子来自c++ primer 4th):Screen& Screen::display(std::ostream& os) const{ os << contents...转换丢失限定符。 出错代码(例子来自c++ primer 4th): Screen& Screen::display(std::ostream& o...
https://www.tsingfun.com/it/cpp/2107.html 

[完整实例源码]C&C++修改文件只读属性 - C/C++ - 清泛网 - 专注C/C++及内核技术

...断该文件是否是只读,然后SetFileAttributes修改文件属性。代码如下:#include "stdafx.h"int _...先使GetFileAttributes获取文件属性,判断该文件是否是只读,然后SetFileAttributes修改文件属性。 代码如下: #include "stdafx.h" int _tmain(int a...
https://www.tsingfun.com/it/cpp/2136.html 

C++ 通过主机名/域名获取IP - C/C++ - 清泛网 - 专注C/C++及内核技术

C++ 通过主机名/域名获取IP代码如下:#include <winsock2.h> 该头文件定义了Socket编程的功能 #pragma comment(lib,"ws2_32.lib") 连接ws2_32.lib库...代码如下: #include <winsock2.h> //该头文件定义了Socket编程的功能 #pragma comment(lib,"ws2_32.lib") ...
https://www.tsingfun.com/it/bigdata_ai/1082.html 

在MongoDB中模拟Auto Increment - 大数据 & AI - 清泛网 - 专注C/C++及内核技术

...省并没有实现,所以需要模拟一下,编程语言以PHP为例,代码大致如下所示:<?phpfunct...MySQL户多半都有Auto Increment情结,不过MongoDB缺省并没有实现,所以需要模拟一下,编程语言以PHP为例,代码大致如下所示: <?php function...
https://www.tsingfun.com/it/tech/1070.html 

PHP中的错误处理 - 更多技术 - 清泛网 - 专注C/C++及内核技术

...之类的错误)都无法捕捉,不过换个角度看,解析错误的代码本身就不应该发布,甚至都不应该进入版本库,关于这一点,我以前写过一篇《Subversion钩子》,里面介绍了如何利Subversion钩子做代码语法检查。 PHP 错误处理
https://www.tsingfun.com/it/tech/1074.html 

Subversion钩子 - 更多技术 - 清泛网 - 专注C/C++及内核技术

...ts/phpcs-svn-pre-commit "$REPOS" -t "$TXN" 1>&2 || exit 1 exit 0 注:代码里使PHP_CodeSniffer检查编码规范。 配置好脚本后,一定要记着给脚本加上可执行属性,不然脚本执行后会显示不知所云的错误信息:svn: Commit blocked by pre-commit hook (exi...