上一页 1 2 3 4 5 6 ··· 18 下一页

Copy 方法 和 ostream 迭代器

摘要: 目录头文件#include templateoutputIterator copy(InputIterator beg,InputIterator end, outputIterator beg)从原型上看主要作用是将一个容器的迭代器拷贝给另外一个容器的迭代器示例代码:#include #include #include #include using namespace std;int main() { int intArray[] = {0,1,2,3,4,5,6,7,8,9}; vector vecList(10); copy(intArray,intArray+10,vecList.b. 阅读全文
posted @ 2014-04-12 14:00 Yours风之恋 阅读(174) 评论(0) 推荐(0) 编辑

STL 之顺序容器

摘要: 目录顺序容器公共方法seqCont.clear() 从容器中删除所有元素seqCont.erase(position) 删除指定位置的元素seqCont.erase(begin,end) 删除一段元素,从begin 到end -1seqCont.insert(position,element) 插入元素到指定位置上seqCont.insert(position.n,element) 插入n个相同元素到指定位置上seqCont.insert(posit... 阅读全文
posted @ 2014-04-12 13:19 Yours风之恋 阅读(135) 评论(0) 推荐(0) 编辑

STL 之容器中的公共方法

摘要: 目录默认构造函数 将对象初始化为空带参构造函数 拷贝构造函数析构函数ct.empty() 判断是否为空ct.size() 元素个数ct.max_size() 最大元素个数ct1.swap(ct2) 交换ct1 和 ct2 中的元素ct.begin() 第一个元素的迭代器ct.end() 最后一个元素的迭代器ct.rbegin() 倒置开始位置,返回最后一个元素的指针ct.r... 阅读全文
posted @ 2014-04-12 12:47 Yours风之恋 阅读(139) 评论(0) 推荐(0) 编辑

STL 顺序容器之Vector

摘要: 目录1,构造方法:vector vecList 创建一个没有任何元素的向量vector vecList(otherVecList) 用另一个类型相同向量初始化该向量vector vecList(size) 初始化一个固定... 阅读全文
posted @ 2014-04-12 11:03 Yours风之恋 阅读(157) 评论(0) 推荐(0) 编辑

STL(标准模板库)

摘要: (此篇只是一个目录,将分成单篇去完成)STL 主要有三个部分组成:容器,迭代器,算法。 第一部分:知其然一,容器*顺序容器向量(Vector)双端队列(Dequeue)表(List) PS: Copy 方法*关联容器集合(Set)多重集合(Mu... 阅读全文
posted @ 2014-04-12 10:09 Yours风之恋 阅读(214) 评论(0) 推荐(0) 编辑

Win32 服务进程和单实例实现

摘要: #pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")HANDLE hMutex = CreateMutexA(NULL, true, "XXX_0D0DDD11-5E3F-4287-BB74-7E3D2C7720EF"); if (hMutex) { if (GetLastError() == ERROR_ALREADY_EXISTS) { //std::cerr << "Program alre 阅读全文
posted @ 2014-04-11 12:38 Yours风之恋 阅读(188) 评论(0) 推荐(0) 编辑

Win32开发(命令行参数处理)

摘要: int n_args = 0; LPWSTR *args = CommandLineToArgvW(GetCommandLineW(), &n_args); if( args ) { if( n_args >= 2 ) { std::wstring filePath = L""; auto last_prm = aux::chars_of(args[n_args - 1]); if( last_prm.like(L"*\\*") || last_prm.like(L... 阅读全文
posted @ 2014-04-10 15:07 Yours风之恋 阅读(289) 评论(0) 推荐(0) 编辑

动态链接库

摘要: 键盘鼠标HOOK Demo1,------------------------ 导出代码// keyHooker.cpp : 定义 DLL 应用程序的导出函数。//#include "stdafx.h"#include "windows.h"HINSTANCE h_st;HHOOK g_KeyBoardHook;//HHOOK g_MouseHook;HWND g_wnd;/*LRESULT CALLBACK MouseProc( int nCode, // hook code WPARAM wParam, // message identifier L 阅读全文
posted @ 2014-04-08 19:12 Yours风之恋 阅读(167) 评论(0) 推荐(0) 编辑

Poco 配置文件读取

摘要: 1,ini格式文件[myApplication]somePath = C:\test dat.datsomeValue = 123#include using namespace std;#include "Poco/Util/Application.h"#include "Poco/Path.h"using namespace Poco::Util;#include "Poco/AutoPtr.h"#include "Poco/Util/IniFileConfiguration.h"using Poco::Aut 阅读全文
posted @ 2014-04-04 15:25 Yours风之恋 阅读(586) 评论(0) 推荐(0) 编辑

Delphi 窗口消息

摘要: function TCmdEbookMin.Execute: string;// var// hHandle : HWND;begin //hHandle := Application.MainForm.Handle; //PostMessage(hHandle, WM_SYSCOMMAND, SC_MINIMIZE, 0); Application.Minimize;end;case Message.msg of WM_COPYDATA: begin str := StrPas(PChar(PCopyDataStruct(Messa... 阅读全文
posted @ 2013-09-25 10:34 Yours风之恋 阅读(181) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 18 下一页