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

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

字符串指针变量与字符数组的区别 - C/C++ - 清泛网 - 专注C/C++及内核技术

... char *name; scanf("%s",name); printf("%s",name); 有的编译器虽然也能通过,但这是错误的,因为是个指针,定义时指向不可用的地址。解决这个问题有两种方法:用数组的方法或给字符针针分配内存空间的方...
https://www.tsingfun.com/it/cpp/1902.html 

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

...include <fstream.h> void main { ifstream file; char output[100]; int x; file.open("file.txt"); file>>output; cout<<output; file>>x; cout<<x; file.close(); } 上面所讲的ofstream和ifstream只能进行读或是写,而fstream则同时提供读写的功能...
https://www.tsingfun.com/it/cpp/2033.html 

atol 头文件 - C/C++ - 清泛网 - 专注C/C++及内核技术

...t char *nptr); 实例: #include <stdlib.h> #include <stdio.h> int main(void) { long l; char *lstr = "98765432"; l = atol(lstr); printf("string = %s integer = %ld\n", lstr, l); return(0); } atol 头文件
https://www.tsingfun.com/it/cpp/2093.html 

error C2662: “Screen::move”: 不能将“this”指针从“const Screen”转...

...display(std::ostream &os) const {os<<contents;} //main中处理 int main() { Screen myScreen(5,3); const Screen blank(5,3); //调用非const版本display myScreen.display(cout).set('#').display(cout); cout << endl; //调用 const版本display blank....
https://www.tsingfun.com/it/cpp/2100.html 

error: ‘std::ios_base::ios_base(const std::ios_base&)’ is private ...

...or<<(std::ostream& s,const Person &p) { s << p.name; return s; } int main() { Person p(std::string("Tom")); std::cout<<p<<std::endl; } 重载输出操作符时,由于流对象不能复制,因此如果以值(by value)形式返回时,无法完成从s到std::osream的复制...
https://www.tsingfun.com/it/cpp/2123.html 

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

...种:pDC->SetBkMode(TRANSPARENT);afx_msg HBRUSH CtlColor(CDC* *pDC* , UINT *nCtlColor* );COLORREF m_crText;COLORREF m_...第一种:pDC->SetBkMode(TRANSPARENT); afx_msg HBRUSH CtlColor(CDC* /*pDC*/, UINT /*nCtlColor*/); COLORREF m_crText; COLORREF m_crBk; HBRUSH m_hbkbr; ... BEGIN_MESSAG...
https://www.tsingfun.com/it/cpp/2145.html 

MFC的DDX和DDV技巧 - C/C++ - 清泛网 - 专注C/C++及内核技术

.../ Dialog Data  //{{AFX_DATA(CMyDlg)  enum { IDD = IDD_DIALOG5 };  int m_edit;  //}}AFX_DATA 2. 在 .CPP文件中的类构造函数告终代码处,增加数据成员变量的一些初始化代码 CMyDlg::CMyDlg(CWnd* pParent )    : CDialog(CMyDlg::IDD, pParent) { //{{AF...
https://www.tsingfun.com/it/cpp/2146.html 

__declspec(dllexport) 导出符号解决链接失败问题 - C/C++ - 清泛网 - 专注C/C++及内核技术

...数 "public: void * __thiscall CBtt::`scalar deleting destructor'(unsigned int)" (??_GCBtt@@QAEPAXI@Z) 中被引用 1>../outdir/Debug/xxx.exe : fatal error LNK1120: 2 个无法解析的外部命令 的编译错误。 原因是引用的dll中的函数没有导出导致,可以用Depends打开dll...
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/te... 

WCF:使用Array替代List - 更多技术 - 清泛网 - 专注IT技能提升

...ypeof(IServiceCallback), SessionMode = SessionMode.Required)] public interface IService { [OperationContract(IsOneWay = true)] void SendData(List<byte> array); } public interface IServiceCallback { [OperationContract(IsOneWay = true)] void RecieveData(List<byte> array...