我的代码如下:
...
#include <boost/regex.hpp>
#include <string>
#include <iostream>
...using namespace std;
using namespace boost;
int main(int argc, char* argv[])
{
char str1[MAX_PATH] = {0};
strcpy(str1, "aaa");//这句出错。
....
}
strcpy()出错的提示是:
error C2668: 'strcpy' : ambiguous call to overloaded function提示有冲突,而如果我不用命名空间,就没有这个问题,请问应该如何解决这类冲突?
...
#include <boost/regex.hpp>
#include <string>
#include <iostream>
...using namespace std;
using namespace boost;
int main(int argc, char* argv[])
{
char str1[MAX_PATH] = {0};
strcpy(str1, "aaa");//这句出错。
....
}
strcpy()出错的提示是:
error C2668: 'strcpy' : ambiguous call to overloaded function提示有冲突,而如果我不用命名空间,就没有这个问题,请问应该如何解决这类冲突?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货