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

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

CMap用法 - C/C++ - 清泛网 - 专注C/C++及内核技术

...p就是对Hash表的一种实现。先上实例: int _tmain(int argc, char* argv[]) { //定义 typedef CMap<int, int, CString, CString> CMapInt; CMapInt map; //添加key,val map.SetAt(1, "str1"); map.SetAt(2, "str2"); map.SetAt(3, "str3"); map.SetAt(1, "str11"); //把st...
https://www.tsingfun.com/it/cpp/1447.html 

WSAAsyncSelect模型 - C/C++ - 清泛网 - 专注C/C++及内核技术

... } break; case FD_WRITE: { } break; case FD_READ: { char szText[1024]={0}; if(recv(s,szText,1024,0)==-1) closesocket(s); else { GetDlgItemText(IDC_EDIT1,strContent); if(!strContent.IsEmpty()) { strContent+="\r\n"; } CString s...
https://www.tsingfun.com/it/cpp/1493.html 

SHFileOperation 这个API函数怎么用起来结果飘忽不定? - C/C++ - 清泛网 -...

...符查找文件,核心代码如下: WIN32_FIND_DATA FindFileData; char szCurPath[MAX_PATH + 1] = { 0 }; GetCurrentDirectory(MAX_PATH, szCurPath); CString findFileName; findFileName.Format("%stest*.txt", szCurPath); HANDLE hFind = ::FindFirstFile(findFileName, &FindFileData); if(INVALI...
https://www.tsingfun.com/it/cpp/1576.html 

截图软件截图区域以外背景变灰的实现--AlphaBlend - C/C++ - 清泛网 - 专注...

...--------画黑色背景---------------- COLORREF bgColor = RGB(0, 0, 0); char alpha = (255 * 30) / 100; int screenX = GetSystemMetrics(SM_CXSCREEN); int screenY = GetSystemMetrics(SM_CYSCREEN); CDC memdc; memdc.CreateCompatibleDC(&dc); CBitmap bmp, *pOldBitmap; bmp.CreateCompatibleBitmap(&...
https://www.tsingfun.com/it/cpp/1823.html 

Linux automake自动编译全攻略 - C/C++ - 清泛网 - 专注C/C++及内核技术

...st.c: #include <stdio.h> #include "lib/calc.h" int main(int argc, char** argv) { int sum = add(1, 2); printf("sum:%d\n", sum); return 0; } 编译及执行结果: 执行: 代码点此下载:automake.zip Linux automake 自动编...
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/2034.html 

Linux编程中各种头文件 - C/C++ - 清泛网 - 专注C/C++及内核技术

...了五种类型、一些宏和通用工具函数。类型例如size_t、wchar_t、div_t、ldiv_t和lldiv_t;宏例如EXIT_FAILURE、EXIT_SUCCESS、RAND_MAX和MB_CUR_MAX等等;常用的函数如malloc()、calloc()、realloc()、free()、system()、atoi()、atol()、rand()、srand()、exit()等等 ...
https://www.tsingfun.com/it/cpp/2045.html 

MiniDumpWriteDump 记录dmp文件的简单实例(附调试方法) - C/C++ - 清泛网...

...LONG WINAPI ExceptionHandler(LPEXCEPTION_POINTERS pExceptionPointers) { char szFile[MAX_PATH] = {0}; SYSTEMTIME st = {0}; GetLocalTime(&st); sprintf_s(szFile, "xxx_%d%02d%02d_%02d%02d%02d.dmp", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond); HANDLE hD...
https://www.tsingfun.com/it/cpp/2091.html 

error C2512: “Foo”: 没有合适的默认构造函数可用 - C/C++ - 清泛网 - 专...

... Foo(int i):ival(i){} private: int ival; }; int main(int argc, char *argv[]) { vector<Foo> empty; vector<Foo> bad(10); vector<Foo> ok(10,1); return 0; } 解决办法: 实际上根据c++ primer第四版解释构造空的vector时是不调用对象的构造函数...
https://www.tsingfun.com/it/cpp/2150.html 

MFC 日期时间控件CDateTimeCtrl自绘 - C/C++ - 清泛网 - 专注C/C++及内核技术

...nFunc.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif CMyDateTime::CMyDateTime() { m_nIDLeft = m_nIDRight = m_nIDCenter = 0; //m_nIDListLeft, m_nIDListRight, m_nIDListTop, m_nIDListBot = 0; m_pfDefault = ::GetFont(_T("微软雅黑...