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

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

c/c++ volatile和mutable关键字 - C/C++ - 清泛网 - 专注C/C++及内核技术

...const,其某个成员也可以被修改。如: struct data { char name[30]; mutable int accesses; }; const data veep = {"hello", 0}; strcpy(veep.name, "hel"); //not allowed veep.accessess++; //allowed veep的const限定符进制程序修改veep的成员,但access成员的mut...
https://www.tsingfun.com/it/cpp/2209.html 

jsoncpp 不能处理__int64(long long)类型数据 - C/C++ - 清泛网 - 专注C/C++及内核技术

... include/json/value.h:188: note: Json::Value::Value(const char*) <near match> include/json/value.h:187: note: Json::Value::Value(double) include/json/value.h:186: note: Json::Value::Value(Json::UInt) include/json/value.h:185: note: ...
https://www.tsingfun.com/it/cpp/2263.html 

去掉std::string或std::wstring最后一个字符的几种简单方法 - C/C++ - 清泛...

...移走最后一个元素。在string/wstring中相当于移走最后一个char/wchar_t。 // 这个方法算是比较简单的了。 // 方法2 s.erase(s.end() - 1); // 删除s的最后一个字符 // 方法3 s = s.substr(0, s.length() - 1); // 取出s从最开始到倒数第二个字符...
https://www.tsingfun.com/it/cpp/2292.html 

ifstream 线程安全读文件 - C/C++ - 清泛网 - 专注C/C++及内核技术

... case EOF: return is; default: t += (char)c; } } } 例子: int main() { std::string path = "end_of_line_test.txt" std::ifstream ifs(path.c_str()); if(!ifs) { std::cout << "Failed to open the file." << std::endl; ...
https://www.tsingfun.com/it/cp... 

c++11右值引用、std::move移动语义、std::forward完美转发的一些总结 - C/C...

...还能拷贝构造,保障代码安全。对于一些基本类型如int和char[10]等,使用std::move()仍然会发生拷贝,因为没有对应的移动构造函数。 对于完美转发而言,右值引用并非“天生神力”,只是c++11新引入了右值,因此为其新定下了引...
https://www.tsingfun.com/it/tech/1998.html 

Java 调用外部进程 - 更多技术 - 清泛网 - 专注C/C++及内核技术

... while (c >= 0) { builder.append((char) c); c = inputStream.read(); } } catch (IOException e) { } } }.start(); } } Java 外部进程
https://bbs.tsingfun.com/thread-491-1-1.html 

Linux automake自动编译全攻略 - 脚本技术 - 清泛IT社区,为创新赋能!

...nclude &lt;stdio.h&gt; #include &quot;lib/calc.h&quot; int main(int argc, char** argv) { &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;int sum = add(1, 2); &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;printf(&quot;sum:%d\n&quot;, sum); &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;r...
https://bbs.tsingfun.com/thread-841-1-1.html 

C语言面试那些事儿──一道指针与数组问题 - c++1y / stl - 清泛IT社区,为创新赋能!

首先看如下代码: int main(int argc, char** argv) { &nbsp; &nbsp; int a[5] = {1,2,3,4,5}; &nbsp; &nbsp; int* ptr = (int*)(&amp;a + 1); &nbsp; &nbsp; printf(&quot;%d,%d\n&quot;, *(a+1), *(ptr-1)); &nbsp; &nbsp; return 0; }复制代码这道题在很多所谓经典C语言面试题里是常见...
https://bbs.tsingfun.com/thread-781-1-1.html 

SHFileOperation 这个API函数怎么用起来结果飘忽不定? - c++1y / stl - 清...

...配符查找文件,核心代码如下: WIN32_FIND_DATA FindFileData; char szCurPath[MAX_PATH + 1] = { 0 }; GetCurrentDirectory(MAX_PATH, szCurPath); CString findFileName; findFileName.Format(&quot;%stest*.txt&quot;, szCurPath); HANDLE hFind = ::FindFirstFile(findFileName, &amp;FindFileData); if...
https://bbs.tsingfun.com/thread-605-1-1.html 

sizeof、strlen简单总结 - C/C++ - 清泛IT论坛,有思想、有深度

sizeof strlen const char* p 4 字符串长度 std::string 4 字符串长度 &quot;......&quot; 字符串长度+1&nbsp; &nbsp;('\0') 字符串长度