摘要: 什么是正则表达式?正则表达式是一种用来描述一定数量文本的模式。Regex代表Regular Express。如果您不知道什么是正则表达式,请看这篇文章http://blog.csdn.net/begtostudy/archive/2007/11/11/1879206.aspx有了正则表达式的基础,问题是如何使用。我们以boost::regex来说先看一个网上经典的例子。#include "stdafx.h"#include #include #include #include #include using namespace std;using namespace boos 阅读全文
posted @ 2013-05-18 19:27 SunboyL 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 初涉OpenGL,整理半天配置,再跟着教程一步一步来理解学习。第一个程序,感觉良好。记录下自己的第一个程序,虽然大部分都是理解+粘贴的,哈哈。以下是Win32下的C++代码。头文件:View Code 1 #include <Windows.h> 2 #include <gl/glew.h> 3 #include <gl/glut.h> 4 5 HGLRC hRC = NULL; 6 HDC hDC = NULL; 7 HWND hWnd = NULL; 8 HINSTANCE hInstance = NULL; 9 10 bool keys[256]; . 阅读全文
posted @ 2013-04-25 21:25 SunboyL 阅读(489) 评论(0) 推荐(0) 编辑
摘要: 利用分治法的思想求解最近对。 阅读全文
posted @ 2013-04-19 20:10 SunboyL 阅读(472) 评论(0) 推荐(0) 编辑
摘要: #include <string>#include <locale.h> // 需包含locale、string头文件、使用setlocale函数。std::wstring StringToWstring(const std::string str){// string转wstring unsigned len = str.size() * 2;// 预留字节数 setlocale(LC_CTYPE, ""); //必须调用此函数 wchar_t *p = new wchar_t[len];// 申请一段内存存放转换后的字符串 mbstowcs(p, 阅读全文
posted @ 2013-03-31 21:20 SunboyL 阅读(17939) 评论(1) 推荐(0) 编辑
摘要: 阐述调用dll文件的两种方式,并记录使用过程中出现过的错误。 阅读全文
posted @ 2013-03-26 22:17 SunboyL 阅读(1115) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2013-03-25 12:41 SunboyL 阅读(106) 评论(9) 推荐(0) 编辑
摘要: 查阅资料的时候发现CNBLOGS是个好地方,总比我之前在163要好,因为这里面多数的博客都是技术文,编辑也比较舒服,我喜欢。以后心情随笔就记录在原博客,记录技术学习的东西就在cnblogs落脚好了,当然,我只是一个菜鸟。 原博客地址:http://liang-v-liang.blog.163.com/ 阅读全文
posted @ 2013-03-23 23:45 SunboyL 阅读(133) 评论(2) 推荐(0) 编辑