在VS2008套裝中的VC 環境下使用正規表示式

2021-06-04 20:22:33 字數 566 閱讀 9399

言歸正傳,以下是msdn中的例子:

// regex_reorder.cpp 

// compile with: /clr 

#using

using namespace system; 

using namespace text::regularexpressions; 

int main() 

;  regex^ reg = gcnew regex("(?//w*)//s*,//s*(?//w*)"); 

for ( int i=0; i < name->length; i++ ) 

", name[i] ); 

match^ m = reg->match( name[i] ); 

if ( m->success ) 

", first, last); 

}  else 

console::writeline("(invalid)"); 

}  return 0; 

}  注意注釋中的compile with: /clr,在編譯時記得加上這個引數。

VS2008中OpenGL環境配置

1.安裝 b 將.lib檔案拷貝到c program files microsoft visual studio 9.0 vc lib目錄中 c 將.dll檔案拷貝到c windows system32目錄中 2.配置環境 先建立乙個win32控制台專案,配置專案屬性 1 專案 專案屬性 配置屬性 ...

在VS2008中配置QT

學了這麼多年的c 最近才開始研究qt。用了一段時間的wpf,覺得當年苦哈哈的學習mfc真是太傻了。用過openframeworks,覺得也還不錯,但是功能還是不夠強大,尤其在ui設計方面,所以現在開始學習qt,希望不會太晚。簡單介紹一下qt在vs2008中的配置。qt win opensource ...

在vs2008中新增lib檔案

下面以新增ws2 32.lib檔案為例 方法一 直接新增 直接在.cpp檔案中,新增 pragma comment lib,ws2 32.lib 即可。ws2 32.lib即為你要新增的lib檔案 方法二 在vs工具欄中新增 1.專案 project tcpsrv屬性 tcpsrv properti...