
C++
leiSniper
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
socket UDP列子
socket编程UDP原创 2015-04-07 15:54:39 · 474 阅读 · 0 评论 -
STL中list的erase()方法
STL中list的erase()方法erase()方法是删除iterator指定的节点 但是要注意的是在执行完此函数的时候iterator也被销毁了 这样的话关于iterator的操作就会报错 以下是关于erase()方法的正确使用 正确使用方法1 std::list< int> List; std::list< int>::iterator itL转载 2015-04-19 22:44:30 · 923 阅读 · 0 评论 -
MFC combbox级联使用
combbox的级联使用,当选择一个combbox的时候,例外一个combbox根据第一个选择变化而变化1. 新建一个基于对话框的MFC工程,在对话框上添加两个combbox控件2. 对combox控件添加对象的变量,这里为m_combProv 和 m_combCity,另外还需要个结构体来放置内容std::multimap m_mumapCity;(需要包含map头文件)3 添加第一原创 2015-06-15 09:40:56 · 1387 阅读 · 0 评论 -
c++ 使用变量控制小数点位数
CString str;int n = 3;float f = 3.1415926;str.Format(_T("%%.%df"), n);str.Format((LPCTSTR)str, f);原创 2018-05-16 14:26:52 · 2285 阅读 · 0 评论 -
linux 非阻塞 connect 注意事项
bool EnableBlockSocket(bool bEnable){ INT nResult = -1; INT nOption = fcntl(m_nFD, F_GETFL, 0); if (nOption >= 0) { if (bEnable) { nOption &= ~O_NONBLOCK; } else { nOp...原创 2019-06-14 16:26:47 · 317 阅读 · 0 评论