怎么使用正则表达式? #include<atlrx.h>我加这个头文件上去,就报错,说没有这个文件,请问是怎么回事啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 报错:E:\temp\Test2\Test2Dlg.cpp(7) : fatal error C1083: Cannot open include file: 'atlrx.h': No such file or directory应该不是路径不错吧???再顶,求助啊 #include "atlrx.h"試試atlrx.h放在什麼路徑? 我试过,好像不行.我在msdn里找atlrx.h都找不到,我就是想在我用MFC做的一个对话框程序里使用一下正则表达式,但是不知道怎么做?我看有人说要添加atl支持,可是怎么添加呢?我直接用插入->atl资源,然后就会报错,说不能编译.我该怎么做呢?求助啊 #include <atlbase.h>extern CComModule _Module;#include <atlcom.h> 加这几句不就支持atl了 #include <atlbase.h>extern CComModule _Module;#include <atlcom.h>#include "atlrx.h"int main(int argc, char* argv[]){ CAtlRegExp<> reUrl; // five match groups: scheme, authority, path, query, fragment REParseError status = reUrl.Parse( "({[^:/?#]+}:)?(//{[^/?#]*})?{[^?#]*}(?{[^#]*})?(#{.*})?" ); if (REPARSE_ERROR_OK != status) { // Unexpected error. return 0; } CAtlREMatchContext<> mcUrl; if (!reUrl.Match( "http://search.microsoft.com/us/Search.asp?qu=atl&boolean=ALL#results", &mcUrl)) { // Unexpected error. return 0; } for (UINT nGroupIndex = 0; nGroupIndex < mcUrl.m_uNumGroups; ++nGroupIndex) { const CAtlREMatchContext<>::RECHAR* szStart = 0; const CAtlREMatchContext<>::RECHAR* szEnd = 0; mcUrl.GetMatch(nGroupIndex, &szStart, &szEnd); ptrdiff_t nLength = szEnd - szStart; printf("%d: \"%.*s\"\n", nGroupIndex, nLength, szStart); } }我试了下,不能编译,仍然提示atlrx.h找不到 我安装了boost然后把#include "boost/regex.hpp"using namespace boost;添加到.cpp文件里,就会报找不到stdafx.h是怎么回事啊?应该添加到哪里呢?我是用vc6,MFC生成的一个简单的对话框程序,求各位帮忙啊 Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include下是有atlrx.h这个文件的 压力测试怎么做?如何找出程序的Bug? 请问-1.#R和-1.#QNAN0分别是什么值 新招的vc软件开发人员,大家说怎么才能给其一个合理的测试呢,笔试或上机,出些什么题目好呢 关于字符串的输出问题?请赐教! 碰到一郁闷问题 有关scanf的问题! 请教VirtualAlloc和new的区别何在?有什么优点? ::PostMessage与::SendMessage有什么区别? 在VC中的C/C++ source code如何实现画图? MFC中如何做到按钮图片的不停切换 打开文件问题 一个很简单的问题!如何将CString类型转换为二进制整型?分不多,100分相送!大侠帮忙!
我在msdn里找atlrx.h都找不到,我就是想在我用MFC做的一个对话框程序里使用一下正则表达式,但是不知道怎么做?
我看有人说要添加atl支持,可是怎么添加呢?
我直接用插入->atl资源,然后就会报错,说不能编译.我该怎么做呢?求助啊
extern CComModule _Module;
#include <atlcom.h> 加这几句不就支持atl了
extern CComModule _Module;
#include <atlcom.h>
#include "atlrx.h"int main(int argc, char* argv[])
{
CAtlRegExp<> reUrl;
// five match groups: scheme, authority, path, query, fragment
REParseError status = reUrl.Parse(
"({[^:/?#]+}:)?(//{[^/?#]*})?{[^?#]*}(?{[^#]*})?(#{.*})?" );
if (REPARSE_ERROR_OK != status)
{
// Unexpected error.
return 0;
}
CAtlREMatchContext<> mcUrl;
if (!reUrl.Match(
"http://search.microsoft.com/us/Search.asp?qu=atl&boolean=ALL#results",
&mcUrl))
{
// Unexpected error.
return 0;
}
for (UINT nGroupIndex = 0; nGroupIndex < mcUrl.m_uNumGroups;
++nGroupIndex)
{
const CAtlREMatchContext<>::RECHAR* szStart = 0;
const CAtlREMatchContext<>::RECHAR* szEnd = 0;
mcUrl.GetMatch(nGroupIndex, &szStart, &szEnd);
ptrdiff_t nLength = szEnd - szStart;
printf("%d: \"%.*s\"\n", nGroupIndex, nLength, szStart);
}
}
我试了下,不能编译,仍然提示atlrx.h找不到
然后把#include "boost/regex.hpp"using namespace boost;添加到.cpp文件里,就会报找不到stdafx.h是怎么回事啊?应该添加到哪里呢?我是用vc6,MFC生成的一个简单的对话框程序,求各位帮忙啊