大约有 48,000 项符合查询结果(耗时:0.0412秒) [XML]
Boost智能指针——shared_ptr - C/C++ - 清泛网 - 专注C/C++及内核技术
...thing\n"; }
};
void test()
{
boost::shared_ptr<implementation> sp1(new implementation());
std::cout<<"The Sample now has "<<sp1.use_count()<<" references\n";
boost::shared_ptr<implementation> sp2 = sp1;
std::cout<<"The Sample now has "<<sp2.use_count()<<" references\n";
...
c++ Timer使用总结 - C/C++ - 清泛网 - 专注C/C++及内核技术
...提供实例参考。窗口应用程序使用Timer:
#define TIMER_ID 1000 //定时器ID,可任意。触发后回调函数中用于区别不同的定时器以执行不同的任务
SetTimer(TIMER_ID, 1000 , NULL); //启动定时器,1秒后触发
KillTimer(TIMER_ID); //取消定时器
...
VC/Linux C++ 递归访问目录下所有文件 - C/C++ - 清泛网 - 专注C/C++及内核技术
...r = NULL;
struct dirent* file = NULL;
if (dirName[dirName.size()-1] != '/')
{
dirName += "/";
}
if ((Dir = opendir(dirName.c_str())) == NULL)
{
cerr << "Can't open Directory" << endl;
exit(1);
}
while (file = readdir(Dir))
{
...
std::string截取字符串,截取ip:port - C/C++ - 清泛网 - 专注C/C++及内核技术
std::string截取字符串,截取ip:portstd::string ip("127.0.0.1:8888");int index = ip.find_last_of(':'); 获取ipip.substr(0, index).c_str(); 获取portip.substr(index + 1).c_str();std::string ip("127.0.0.1:8888");
int index = ip.find_last_of(':');
// 获取ip
ip.substr(0, index).c_str();...
DoModal() 不显示的问题总结 - C/C++ - 清泛网 - 专注C/C++及内核技术
...结int nResponse = dlg.DoModal();对话框窗口不显示,返回值为-1。出现这种情况一般是.rc资源文件的问题导致。1、核对一下resource.h,本...int nResponse = dlg.DoModal();对话框窗口不显示,返回值为-1。
出现这种情况一般是.rc资源文件的问题...
mfc spin control 用法 - C/C++ - 清泛网 - 专注C/C++及内核技术
...此添加控件通知处理程序代码
if(pNMUpDown->iDelta == 1) // 如果此值为1 , 说明点击了Spin的往下箭头
{...
}
else if(pNMUpDown->iDelta == -1) // 如果此值为-1 , 说明点击了Spin的往上箭头
{...
}
...
截图软件截图区域以外背景变灰的实现--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(&dc, screenX, screenY);
pO...
字符串指针变量与字符数组的区别 - C/C++ - 清泛网 - 专注C/C++及内核技术
...字符数组的区别使用字符串指针变量与字符数组的区别(1)分配内存 设有定义字符型指针变量与字符数组的语句如下: char *pc ,str[100]; 则系统...使用字符串指针变量与字符数组的区别
(1)分配内存
设有定义...
c/c++浮点输出时,不显示小数点后没用的0 - C/C++ - 清泛网 - 专注C/C++及内核技术
...科学记数法还是一般的小数记数法。
例如:
float f = 3.14;
printf("%f\n", f);
printf("%g\n", f);
不过要注意,若使用%g输出0.000000001(即浮点数的0,不理解的请参考《浮点数在内存中的表示》)时,它显示的是e-xxx科学计数的形...
C++ ADO Excel中RecordSet.Open打开记录的两个参数adOpenKeyset、adLockBat...
...两个参数adOpenKeyset、adLockBatchOptimistic的详细说明:缺省值1 adLockReadOnly RecordSet...C++ ADO Excel中RecordSet.Open打开记录的两个参数adOpenKeyset、adLockBatchOptimistic的详细说明:
缺省值 1 adLockReadOnly RecordSet对象以只读方式启动...
