自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 C++0x尝鲜:如何获取lambda表达式的返回类型

int f() { return 1; }struct X{ float operator () () const { return 2; } // If the following is enabled, program fails to compile // mostly because of ambiguity reasons. //double operato

2010-04-26 22:44:00 2257

原创 趣味编程:用BGL求解八数码问题(A*)

 A* Graph Search Within the BGL Framework 代码#include #include #include #include "nonconst_bfs.hpp" // so we can modify the graph#include #include #include #include #include

2010-04-24 01:43:00 1422 1

原创 趣味编程:用LINQ求解八皇后问题

C#源码摘自CSDN论坛.NET技术贴:从n皇后问题看Linq的对算法思想的清晰表达力,原作者sp1234。注:变量名及程序逻辑稍有改动,求解部分加上了注释。 C#代码using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Consol

2010-04-18 03:26:00 1301

原创 C++类库:P-Stade.Oven

 关于P-Stade.Oven P-Stade.Oven是一个Boost.Range的扩展库,同时也是Range Library Proposal提案的一个具体实现。借助于这个类库,我们就能在Range上实施STL算法,从而获得更为简洁清晰的代码。 示例代码#include#include#include #include #include #inclu

2010-04-17 04:38:00 985

原创 Visual Studio 2010 使用笔记

注册产品 菜单Help/Register Product Help管理(安装本地Help等) 用菜单Help/Manage Help Settings打开Help Library Manager窗口 安全模式 /SafeMode 配置全局VC路径 用菜单Tools/Options打开Options窗口会发现Projects and Solut

2010-04-17 03:37:00 4167

原创 趣味编程:静夜思

C#版本摘自老赵点滴 - 追求编程之美 C#代码using System;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { static void Print(string text, int offset) {

2010-04-16 01:00:00 2126

原创 C++0x尝鲜:perfect forwarding(完美转发)

代码1#include #include using namespace std;void inner(string&) { cout << "inner(string&)" << endl;}void inner(const string&) { cout << "inner(const string&)" << endl;}template void outer(

2010-04-13 11:16:00 1816

原创 FP编程实践:在C++0x中模拟F#的List.map和List.choose库函数

F#代码let list1 = [1; 2; 3]let newList = List.map (fun x -> x + 1) list1printfn "%A" newList//[2; 3; 4]let listWords = [ "and"; "Rome"; "Bob"; "apple"; "zebra" ]let isCapitalized (string1:string

2010-04-12 19:14:00 1757

原创 C++0x新特性:decltype类型指示符与返回类型后置语法

 关于decltype关键字 decltype是C++0x所引入的用于提取表达式类型的新关键字,其语法形式为:decltype(expression) 。这种语法形式在C++0x草案中被称为decltype类型指示符。 根据C++0x最终草案,decltype(e)所提取的类型由以下规则决定: 如果e是一个没有外层括弧的标识符表达式或者类成员访问表达式,那么declty

2010-04-11 10:26:00 6836

原创 C++0x新概念:glvalue, xvalue, prvalue(泛左值,x值,纯右值)

以下内容摘自最新的C++0x草案All expressions are now divided into three "value categories":* "lvalues" are the same as what's meant traditionally by lvalue.* "xvalues" are objects created by rvalue referen

2010-04-07 21:16:00 8366

原创 C++0x尝鲜:Variadic Function Templates(带变长参数的函数模板)

关于变长参数模板(Variadic Templates)在C++0x之前,模板(包括类模板和函数模板)参数的个数和类型是固定不变的,而且都必须在定义时预先确定。在C++0x中,这一点得到了改善,模板(无论类模板还是函数模板)将具有指定任意个数任意类型参数的能力,这就是所谓的变长参数模板(Variadic Templates)。下面我们就用代码说明带变长参数的函数模板。C++代码

2010-04-05 01:22:00 5515 4

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除