大约有 1,700 项符合查询结果(耗时:0.0073秒) [XML]

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

C++代码执行安装包静默安装 - C/C++ - 清泛网 - 专注C/C++及内核技术

...ESS; //不可少,否则不会等待安装结束 (详见SHELLEXECUTEINFO定义: HANDLE hProcess; // out, valid when SEE_MASK_NOCLOSEPROCESS specified) // Ask for privileges elevation. sei.lpVerb = TEXT("runas"); // Create a Command Prompt from which y...
https://www.tsingfun.com/it/cpp/1902.html 

c++文件流基本用法(ifstream, ostream,fstream) - C/C++ - 清泛网 - 专注C/C++及内核技术

...out) //do an input or output here file.close(); } open函数的参数定义了文件的打开模式。总共有如下模式 ios::in 读 ios::out 写 ios::app 从文件末尾开始写 ios::binary 二进制模式 ios::nocreate 打开一个文件时,如果文件不存在,不创...
https://www.tsingfun.com/it/cpp/2041.html 

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

...算术操作符、相等操作符、关系操作符和位操作符,最好定义为普通非成员函数。因此+应该重载为普通非成员函数。这里重载为成员函数时多了一个this形参,故对于+操作符来说,出现参数过多的错误。 即书写为: // header fi...
https://www.tsingfun.com/it/cpp/2090.html 

error C2664: “find_char”: 不能将参数 1 从“const char [14]”转换为“...

...} 解决方法:如果函数不修改相应实参,应该将引用形参定义为const引用,这样字面值常量、const对象也能调用此函数,避免不必要的限制。error C2664 find_char
https://www.tsingfun.com/it/cpp/2094.html 

error C2758: “ConstInit::cival”: 必须在构造函数基/成员初始值设定项列...

... int &rival; //只要初始化表达式是一个常量,可以再定义体中进行初始化 static const int period = 30; public: static const unsigned int ARRAY[3];//静态常量数组 }; const unsigned int ConstInit::ARRAY[3] = {1,3,5}; int main(int argc, char *argv[]) { ...
https://www.tsingfun.com/it/cpp/2101.html 

passing xxx as \'this\' argument of xxx discards qualifiers - C/C++ - 清泛网 - 专注C/C++及内核技术

...象了,那么调用getId等方法时只能调用其const版本,因为没有定义这个版本,因此编译器提示错误. 解决方法就是将getId和getName方法声明为const成员,即在函数末尾加上const关键字。 const 常量成员
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 ...
https://www.tsingfun.com/it/cpp/2128.html 

VC 对话框背景色覆盖CEdit背景色的解决方法 - C/C++ - 清泛网 - 专注C/C++及内核技术

...有的Edit控件背景色绘生效,如图: 控件类型的宏定义: CTLCOLOR_BTN 按钮控件 CTLCOLOR_DLG 对话框 CTLCOLOR_EDIT 编辑框 CTLCOLOR_LISTBOX 列表框 CTLCOLOR_MSGBOX 消息框 CTLCOLOR_SCROLLBAR 滚动条 CTLCOLOR_STATIC 静态文本 当然也可...
https://www.tsingfun.com/it/cpp/2140.html 

解决WaitForSingleObject阻塞UI线程的问题 - C/C++ - 清泛网 - 专注C/C++及内核技术

...ORD dwWakeMask //the type of message to be wait ); 参数dwWakeMask定义了要等待的消息的类型。 至此,问题完美解决。若要更详细的了解解决过程可参考:http://blog.csdn.net/silvervi/article/details/5874212WaitForSingleObject 阻塞 UI线程
https://www.tsingfun.com/it/cpp/2176.html 

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

...数point值为(0,0)因为是相对窗口左上角的相对位置。 定义参考如下: #ifndef NOKEYSTATES /* * Key State Masks for Mouse Messages */ #define MK_LBUTTON 0x0001 #define MK_RBUTTON 0x0002 #define MK_SHIFT 0x0004 #define MK_CONTROL ...