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

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

error: cannot dynamic_cast ‘b’ (of type ‘class Base*’) to type ‘c...

...态的,即要求至少有一个虚函数,因此需要仔细检查类定义有无虚函数,例如可以将析构函数设置为虚函数. 更正后的代码为(来自: c++ - converting a base class pointer to a derived class pointer): #include <iostream> using namespace std; class Base {...
https://www.tsingfun.com/it/cpp/2104.html 

auto_ptr is not dereferencable - C/C++ - 清泛网 - 专注C/C++及内核技术

...t pt1's does nothing auto_ptr在拷贝时会转移内存控制权,例子pt1赋值给pt2后,将内存管理权转移给pt2, 此时pt1指针为NULL。 auto_ptr dereferencable
https://www.tsingfun.com/it/cpp/2117.html 

Error: must call SetScrollSizes() or SetScaleToFitSize()问题的解决 - C...

...程序运行后发生错误,调试发现程序进入下面的错误处理。 void CScrollView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo) { ASSERT_VALID(pDC); #ifdef _DEBUG if (m_nMapMode == MM_NONE) { TRACE(traceAppMsg, 0, "Error: must call SetScrollSizes() or ...
https://www.tsingfun.com/it/cpp/2123.html 

MFC Static透明背景色的实现、Static控件自绘、Static字体修改 - C/C++ - ...

...改变字体、文本颜色等。 自绘时注意点: 1、消息映射不要有:ON_WM_PAINT、ON_WM_DRAWITEM 消息,否则DrawItem函数不会被调用。 2、DrawItem而非OnDrawItem。OnDrawItem是ON_WM_DRAWITEM消息的处理函数,是处理子控件发送过来的自绘消息的。...
https://www.tsingfun.com/it/cpp/2124.html 

MFC RoundRect、FillRect等函数如何设置颜色 - C/C++ - 清泛网 - 专注C/C++及内核技术

... pDC->RoundRect(rectEdit, point); pDC->SelectObject(oldpen); CDCFillRect与FillSolidRect的区别: 在网上找FillRect与FillSolidRect的时候通常都会看到下面的一句话。 FillSolidRect与CDC::FillRect类似,FillSolidRect只能使用固体色(由COLORREF参数决定...
https://www.tsingfun.com/it/cpp/2176.html 

OnMouseMove nFlags的作用 - C/C++ - 清泛网 - 专注C/C++及内核技术

...键按下时。 MK_LBUTTON当鼠标左键按下时。 MK_MBUTTON当鼠标键按下时。 MK_RBUTTON当鼠标右键按下时. MK_SHIFT当SHIFT按下时。 注:point是相对位置,例如当窗口的左上角坐标为(10,10)那么当鼠标在屏幕的(10,10)像素点的时候,OnM...
https://www.tsingfun.com/it/cpp/2191.html 

如何提高 VS2010/VS2012 编译速度 - C/C++ - 清泛网 - 专注C/C++及内核技术

...> Yes(/MP) 默认情况下Debug/Release均未设置。 在全局参数可以设置最大并行project的数目。默认情况下该参数有系统的“核”数决定。如i7 CPU默认为8。 Options->Projects and Solutions->Build and Run: 8 maximum number of parallel project builds. V...
https://www.tsingfun.com/it/cpp/2290.html 

jupyter notebook选择conda环境 - C/C++ - 清泛网 - 专注C/C++及内核技术

... 安装: conda install ipykernel 将环境写入notebook的kernel python -m ipykernel install --user --name 环境名称 --display-name "Python (环境名称)" 然后打开notebook jupyter notebook 浏览器打开对应地址,新建python,就会有对应的环境提示...
https://www.tsingfun.com/it/cpp/2432.html 

C++ 智能指针shared_ptr,weak_ptr,shared_from_this实践 - C/C++ - 清泛网 - 专注C/C++及内核技术

...后出作用域自动释放引用计数。 shared_from_this() 在本对象使用必须依赖本对象存在,如果本对象已释放,它的行为不确定。 回调函数使用: 强指针:任务都要执行;弱指针:允许某情况下任务丢弃不执行。 强指针 lock 时会...
https://www.tsingfun.com/it/cp... 

Google C++编码规范(Google C++ Style Guide) - C/C++ - 清泛网 - 专注C/C++及内核技术

...定的,记得活学活用。 注:原图较大,请在新标签页打开或保存到本地打开更清晰。google style c++