Chinaunix首页 | 论坛 | 博客
  • 博客访问: 19458
  • 博文数量: 33
  • 博客积分: 291
  • 博客等级: 准尉
  • 技术积分: 295
  • 用 户 组: 普通用户
  • 注册时间: 2011-05-20 09:47
文章分类

全部博文(33)

文章存档

2011年(33)

我的朋友

分类: C/C++

2011-06-18 19:20:46

1、下载zip文件 解压到 d:\boost_1_45_0

2、运行bootstrap.bat 编译出 bjam.exe

3、改D:\boost_1_45_0\tools\build\v2\user-config.jam

找到如下所示的字符串。

 #  MSVC configuration 

  #  Configure msvc (default version, searched in standard location 

#  and PATH). 

#  using msvc ; 

  在此字符串下面添加如下命令行,并保存。

 using msvc : 9.0 : : /wd4819 /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE  /D_SECURE_SCL=0 ; 


bjam --without-python --toolset=msvc-9.0 --prefix=d:\develop\boost install


5、设置开发环境

打开VS2008 选择 工具->选项->vc++目录

设置包含文件目录D:\develop\boost\include\boost-1_45

设置引用文件目录:d:\develop\boost\lib

 

 

#include
#include
#include
#include
#include
  
usingnamespacestd;
usingnamespaceboost;
  
regex expression("^select ([a-zA-Z]*) from ([a-zA-Z]*)");
  
intmain(intargc, char* argv[])
{
    std::string in;
    cmatch what;
    cout << "enter test string"<< endl;
    getline(cin,in);
    if(regex_match(in.c_str(), what, expression)) {
        for(inti=0;i<(int)what.size();i++)
            cout<<"str :"<
    } else{
        cout<<"Error Input"<
    }
  
    while(1);
    return0;
}
阅读(415) | 评论(0) | 转发(0) |
0

上一篇:【转】 技术与人生 谈程序员的成长

下一篇:没有了

给主人留下些什么吧!~~