+ -
当前位置:首页 → 问答吧 → 11.10版本的全屏问题

11.10版本的全屏问题

时间:2011-11-04

来源:互联网

source file: hello.cpp
代码:
#include <iostream>
using namespace std;
int main()
{
   cout<<¨hello, world!¨<<endl;
   return 0;
}


compile in terminal:
g++ hello.cpp -o hello

results:


hello.cpp:5:2: error: stray ‘\302’ in program
hello.cpp:5:2: error: stray ‘\250’ in program
hello.cpp:5:2: error: stray ‘\302’ in program
hello.cpp:5:2: error: stray ‘\250’ in program
hello.cpp: In function ‘int main()’:
hello.cpp:5:10: error: ‘hello’ was not declared in this scope
hello.cpp:5:17: error: ‘world’ was not declared in this scope
hello.cpp:5:22: error: expected ‘;’ before ‘!’ token


what´s the.........help me~
thank you very much!!!

最后由 hughchai 编辑于 2011-11-04 10:28,总共编辑了 1 次

作者: hughchai   发布时间: 2011-11-04

双引号有问题。

作者: wjchen   发布时间: 2011-11-04

我嘛我学了这么久的C,cpp居然看不是很懂。。。

作者: 枫叶饭团   发布时间: 2011-11-04

就是键盘输入的双引号啊。。 ""
wjchen 写道:
双引号有问题。

作者: hughchai   发布时间: 2011-11-04

你帖子上的双引号:¨¨
我输入的英文双引号:""
我输入的中文双引号:“”

不知道你输入的到底是啥,反正不是英文的双引号。

作者: 懒蜗牛Gentoo   发布时间: 2011-11-04

肯定不是英文的双引号

作者: lainme   发布时间: 2011-11-04

果然是双引号的问题。已经解决了。

在Keyboard Layout设置中键盘选择English(US)就OK了。
之前是English(US, alternative international)

谢谢大家!

wjchen 写道:
双引号有问题。


懒蜗牛Gentoo 写道:
你帖子上的双引号:¨¨
我输入的英文双引号:""
我输入的中文双引号:“”

不知道你输入的到底是啥,反正不是英文的双引号。


枫叶饭团 写道:
代码:
¨!="


最后由 hughchai 编辑于 2011-11-04 12:09,总共编辑了 1 次

作者: hughchai   发布时间: 2011-11-04

代码:
¨!="

作者: 枫叶饭团   发布时间: 2011-11-04

热门下载

更多