可能的原因是什么? [英] what is possbole cause?

查看:128
本文介绍了可能的原因是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用SGI STL进行字符串类。当我这样做时:

std :: string(" hi");


Comipler抱怨:

" myTest .C",第10行:错误:命名空间std没有成员string

std :: string str(" myTest");

^


" myTest.C",第10行:错误:预期a" ;;"

std :: string str(" myTest");

^


make:*** [myTest.o]错误1


我做依赖,它明确指出:

" ; myTest.o:/ usr / local / include / sgistl / string"


vi" / usr / local / include / sgistl / string",我可以看到std名称空间是

定义了,为什么

编译器会抱怨呢?


谢谢。

I am using SGI STL for string class. When I do following:
std::string("hi");

Comipler complains:
"myTest.C", line 10: error: namespace "std" has no member "string"
std::string str("myTest");
^

"myTest.C", line 10: error: expected a ";"
std::string str("myTest");
^

make: *** [myTest.o] Error 1

I do make depend, it clearly states:
"myTest.o: /usr/local/include/sgistl/string"

vi "/usr/local/include/sgistl/string", I can see std namespace is
defined, why does
compiler complains then?

thanks.

推荐答案

#include< string>

//?

#include <string>
// ?


我做过

I did


发布您的代码,以便我们提供帮助。

Post your code so we can help.


这篇关于可能的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆