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

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

C语言判断文件是否存在 - C/C++ - 清泛网 - 专注C/C++及内核技术

...言判断文件是否存在用函数access,头文件是io.h,原型:int access(const char *filename, int amode);amode参数为0时表示检查文件的存在性,如果文件存...用函数access,头文件是io.h,原型: int access(const char *filename, int amode); amode参数为0时...
https://www.tsingfun.com/it/cpp/1359.html 

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

...相关操作。 File* fh = fopen("hello","r"); if(fh == NULL) { printf("%s","can not open the file"); } 三、_access 当然C中还有一种方式是直接调用c的函数库。 就是函数 int _access(const char* path,int mode); 这个函数的功能十分强大。 可以看看ms...
https://www.tsingfun.com/it/cpp/1492.html 

vc/mfc *通配符 批量删除文件 - C/C++ - 清泛网 - 专注C/C++及内核技术

...效,使用SHFileOperation函数:#include "stdafx.h"#include <windows.h>int _tmain(int argc, _TCHAR*...直接上代码,可直接运行亲测有效,使用SHFileOperation函数: #include "stdafx.h" #include <windows.h> int _tmain(int argc, _TCHAR* argv[]) { LPTSTR delFileName...
https://www.tsingfun.com/it/cpp/1542.html 

控件不响应OWNERDRAW消息 - C/C++ - 清泛网 - 专注C/C++及内核技术

控件不响应OWNERDRAW消息afx_msg voidOnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);void COrderPaneDlg::OnDrawItem(int nIDCtl, LPDRAWITEM...afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct); void COrderPaneDlg::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemS...
https://www.tsingfun.com/it/cpp/1543.html 

mfc 如何隐藏滚动条 - C/C++ - 清泛网 - 专注C/C++及内核技术

mfc 如何隐藏滚动条void Cxxx::OnSize(UINT nType, int cx, int cy){ ... ShowScrollBar(SB_BOTH, FALSE); ...}简单粗暴,最实用,亲测有效。void Cxxx::OnSize(UINT nType, int cx, int cy) { ... ShowScrollBar(SB_BOTH, FALSE); ... } 简单粗暴,最实用,...
https://www.tsingfun.com/it/cpp/1966.html 

[源码实例] c/c++获取网卡mac地址 - C/C++ - 清泛网 - 专注C/C++及内核技术

... NameBuff [30]; }ASTAT, * PASTAT; ASTAT Adapter; void getmac_one (int lana_num,char *pMicID) { NCB ncb; UCHAR uRetCode; memset( &ncb, 0, sizeof(ncb) ); ncb.ncb_command = NCBRESET; ncb.ncb_lana_num = lana_num; // 指定网卡号 // 首先对选定的网卡发送一个NC...
https://www.tsingfun.com/it/cpp/2091.html 

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

...g namespace std; //顺序容器举例 class Foo { public: 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第...
https://www.tsingfun.com/it/cpp/2101.html 

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

...#include <set> using namespace std; class StudentT { public: int id; string name; public: StudentT(int _id, string _name) : id(_id), name(_name) { } int getId() { // 应该声明为const成员 return id; } string getName() { // 应该声明...
https://www.tsingfun.com/it/cpp/2185.html 

MFC 时间控件CDataTimeCtrl使用(获取日期、时间字符串等) - C/C++ - 清泛...

... m_date; ( (CDateTimeCtrl*)GetDlgItem(IDC_StartDate) )->GetTime(m_date); int year1 = m_date.GetYear(); int month1 = m_date.GetMonth(); int day1 = m_date.GetDay(); ( (CDateTimeCtrl*)GetDlgItem(IDC_StartHour) )->GetTime(m_date); int hour1 = m_date.GetHour(); 然后可以按照规定的格式...
https://www.tsingfun.com/it/cp... 

memcpy() 是非线程安全的,并发时需加锁或使用原子操作 - C/C++ - 清泛网 -...

...子操作memcpy_thread_unsafe最近调查线上一个问题,就是一块 int32 的内存会极低概率出现 -18亿的巨数字,有时又是正确的。自己刻意测试又不能再现,在确认不可能将这样一个巨量数字写入的情况下,这时只 最近调查线上一个问...