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

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

BugTrap:程序崩溃快照、bug跟踪之利器 - C/C++ - 清泛网 - 专注C/C++及内核技术

...UnhandledExceptionFilter); ... } 逻辑处理MyBugTrap.cpp: #include "stdafx.h" #include "BugTrap\BugTrap.h" #include "MyBugTrap.h" static void SetupExceptionHandler() { LOG_TRACER(); BT_InstallSehFilter(); // 配置信息 BT_SetAppName(_T("MarketInfo")); BT_Set...
https://www.tsingfun.com/it/cpp/1359.html 

C++中判断文件、目录是否存在的几种方法 - C/C++ - 清泛网 - 专注C/C++及内核技术

... 这个函数的功能十分强大。 可以看看msdn的详细介绍 #include <io.h> #include <stdio.h> #include <stdlib.h> int main( void ) { // Check for existence. if( (_access( "crt_ACCESS.C", 0 )) != -1 ) { printf_s( "File crt_ACCESS.C exists.\n" ); ...
https://www.tsingfun.com/it/cpp/1372.html 

Boost智能指针——shared_ptr - C/C++ - 清泛网 - 专注C/C++及内核技术

...指针,首先让我们通过一个例子看看它的基本用法: #include <string> #include <iostream> #include <boost/shared_ptr.hpp> class implementation { public: ~implementation() { std::cout <<"destroying implementation\n"; } void do_something() { std::cout << "did some...
https://www.tsingfun.com/it/cpp/1434.html 

stl 字符串std::string作为std::map主键key的实例 - C/C++ - 清泛网 - 专注C/C++及内核技术

...用法,并使用find_if实现map按value值查找。代码如下: #include <map> #include <string> #include <algorithm> using namespace std; class map_value_finder { public: map_value_finder(const std::string &cmp_string):m_s_cmp_string(cmp_string){} bool operator ()(const s...
https://www.tsingfun.com/it/cpp/1516.html 

error C2143:语法错误 : 缺少“;”(在“*”的前面) error C4430:缺少类型说...

...定为 int。注意: C++ 不支持默认 int 一般这个错误是没有include头文件导致, 仔细检查下 .h 中是不是定义类成员变量时没有包含相应的头文件。 拓展: .h中定义类对象成员变量必须include头文件; 相反,.h中定义类指针成...
https://www.tsingfun.com/it/cpp/2036.html 

error C2664:...No user-defined-conversion operator available that can ...

...ble that can perform this conversion, or the operator cannot be called #include <iostream> #include <list> #include <deque> using namespace std; void main() { //Define a list that holds elements that are deques that hold ints deque<int> ideque(10,1); ...
https://www.tsingfun.com/it/cpp/2044.html 

Windows下如何判断Win32 or x64? - C/C++ - 清泛网 - 专注C/C++及内核技术

...看一段程序:(分别在 Win32 和 x64 配置下运行一次) #include <iostream> using namespace std; int main() { #ifdef _WIN64 cout << "_WIN64 is defined as " << _WIN64 << endl; #endif #ifdef _WIN32 cout << "_WIN32 is defined as " << _WIN32 << endl; #endif cin.get(); re...
https://www.tsingfun.com/it/cpp/2069.html 

C++虚析构函数解析 - C/C++ - 清泛网 - 专注C/C++及内核技术

...ttp://blog.sina.com.cn/s/blog_7c773cc50100y9hz.html a.第一段代码 #include<iostream> using namespace std; class ClxBase{ public: ClxBase() {}; ~ClxBase() {cout << "Output from the destructor of class ClxBase!" << endl;}; void DoSomething() { cout << "Do something in class...
https://www.tsingfun.com/it/cpp/2096.html 

error C2664: “std::list::list(const std::allocator &)”: 不能将参数 1...

...的转换运算符,或者无法调用该运算符 出错代码: #include <iostream> #include <vector> #include <list> using std::vector; using std::list; using std::cout; //容器初始化举例 int main() { vector<int> ivec;//使用默认构造函数 vector<int> ivec2(ivec);//...
https://www.tsingfun.com/it/cpp/2221.html 

C++ 取得系统当前时间 - C/C++ - 清泛网 - 专注C/C++及内核技术

C++ 取得系统当前时间方法一,只能精确到秒#include <time.h> time_t tt = time(NULL); 这句返回的只是一个时间戳 tm* t= localtime(&tt); printf("%d...方法一,只能精确到秒 #include <time.h> time_t tt = time(NULL);//这句返回的只是一个时间戳 tm* t= l...