大约有 40,000 项符合查询结果(耗时:0.0375秒) [XML]
[since C++11] std::array的使用 - C/C++ - 清泛网 - 专注C/C++及内核技术
...y<char> as a fix sized c-string.
array<char, 100> str = {0}; // all elements initialized with 0.
char *p = str.data();
strcpy(p, "hello world");
printf("%s\n", p); // hello world
END_TEST;
上面这个例子让我想起了std::string, 它有一个c_str()方法,...
设置用户默认权限 Umask命令详解 - 更多技术 - 清泛网 - 专注C/C++及内核技术
...22 = 644
注:权限计算实际上是二进制位的与操作,参考All About the umask and Permissions。
操作bar.tar
shell> tar xf bar.tar
这次有点不同,我们要运行两次tar命令。
第一次:以root身份运行tar命令,然后查看目录和文件的权限,分别...
原子vector的一种实现源码(atomic-vector) - C/C++ - 清泛网 - 专注C/C++及内核技术
原子vector的一种实现源码(atomic-vector)atomic-vector来自Facebook的一种实现,源码如下: * +----------------------------------------------------------------------+ | HipHop for PHP 来自Facebook的一种实现,源码如下:
/*
+--------------------...
win7 安装项目管理工具redmine2.5.1 - 开源 & Github - 清泛网 - 专注C/C++及内核技术
...要开始这项工作。
一、了解redmine
参考redmine官方的Installtion Guide,主要是对redmine有个大致的了解。
http://www.redmine.org/projects/redmine/wiki/RedmineInstall
二、下载必要的软件包
我用的是以下的版本:
redmine-2.5.1.zip
railsinstaller-2....
vc/mfc *通配符 批量删除文件 - C/C++ - 清泛网 - 专注C/C++及内核技术
...0'也一样,笔者亲测,删除有时成功有时失败。
改用C++的FindNextFile,支持 * 通配符查找文件,核心代码如下:
WIN32_FIND_DATA FindFileData;
char szCurPath[MAX_PATH + 1] = { 0 };
GetCurrentDirectory(MAX_PATH, szCurPath);
CString findFileName;
findFileName....
Android应用内存泄露分析、改善经验总结 - 更多技术 - 清泛网 - 专注C/C++及内核技术
...用,右键某个类→Merge Shortest Paths to GC Roots→exclude all phantom/weak/soft etc.references。
验证改善效果
  根据个人经验,我一般是这样验证改善效果的,运行程序,各个功能跑一遍,确保没有改出问题,完全退出程序,...
VC窗口刷新InvalidateRect和UpdateWindow - C/C++ - 清泛网 - 专注C/C++及内核技术
...INT messages. If an application processes a WM_PAINT message but does not call BeginPaint or otherwise clear the update region, the application continues to receive WM_PAINT messages as long as the region is not empty. In all cases, an application must clear the update region before returning from t...
了解 Boost Filesystem Library - C/C++ - 清泛网 - 专注C/C++及内核技术
...即使其他程序在访问同一文件也如此!
unsigned long remove_all(const path& p):此 API 尝试删除路径 p 所引用的文件或目录。与 remove 不同,此函数并不会特殊考虑不为空的目录。此函数是 UNIX rm –rf 命令的 Boost 对等项。
实用工具...
tinyxml XML解析库下载(tinyxml2.h 和 tinyxml2.cpp) - 源码下载 - 清泛...
...>
# include <cstdarg>
#endif
/*
TODO: intern strings instead of allocation.
*/
/*
gcc:
g++ -Wall -DDEBUG tinyxml2.cpp xmltest.cpp -o gccxmltest.exe
Formatting, Artistic Style:
AStyle.exe --style=1tbs --indent-switches --break-closing-brackets --indent-preproce...
std::vector find查找方法 - C/C++ - 清泛网 - 专注C/C++及内核技术
...= vecTest.end();
注意:.begin(),.end()一定不要忘记了后面的括号,否则报如下错误:
error C3867: “std::vector<_Ty>::end”: 函数调用缺少参数列表;请使用“&std::vector<_Ty>::end”创建指向成员的指针vector find
