怎么搭建C++编程环境?[已解决]
-
- 帖子: 152
- 注册时间: 2006-08-16 22:19
- 来自: 湖北武汉
- 联系:
怎么搭建C++编程环境?[已解决]
问问,还有什么好的IDE?Eclipse这等慢的拉屎的就别提了。
PS:就是一个用cout输出hello world的简单程序
当头文件为#include <iostream>提示下面错误
dvdface@ubuntu:~/Desktop$ g++ a.c
a.c: In function ‘int main()’:
a.c:6: 错误: ‘cout’ 在此作用域中尚未声明
a.c:6: 错误: ‘endl’ 在此作用域中尚未声明
当头文件为#include <iostream.h>提示这个错误
dvdface@ubuntu:~/Desktop$ g++ a.c
In file included from /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/ 4.0.3/backward/iostream.h:31,
from a.c:1:
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/backward/backwar d_warning.h:32:2: warning: #warning This file includes at least one deprecated o r antiquated header. Please consider using one of the 32 headers found in sectio n 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated head er <iostream.h>. To disable this warning use -Wno-deprecated.
怎么回事?
听说VIM可以支持语法高亮,怎么设置,直接在这里说出来好了。
如果有详细的网址说明也可以。vim.org上面说的感觉太抽象了。
都是一项一项列的,不符合平常的学习习惯。
VIM和VI的之间有联系吗?
谢谢了!
PS:就是一个用cout输出hello world的简单程序
当头文件为#include <iostream>提示下面错误
dvdface@ubuntu:~/Desktop$ g++ a.c
a.c: In function ‘int main()’:
a.c:6: 错误: ‘cout’ 在此作用域中尚未声明
a.c:6: 错误: ‘endl’ 在此作用域中尚未声明
当头文件为#include <iostream.h>提示这个错误
dvdface@ubuntu:~/Desktop$ g++ a.c
In file included from /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/ 4.0.3/backward/iostream.h:31,
from a.c:1:
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/backward/backwar d_warning.h:32:2: warning: #warning This file includes at least one deprecated o r antiquated header. Please consider using one of the 32 headers found in sectio n 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated head er <iostream.h>. To disable this warning use -Wno-deprecated.
怎么回事?
听说VIM可以支持语法高亮,怎么设置,直接在这里说出来好了。
如果有详细的网址说明也可以。vim.org上面说的感觉太抽象了。
都是一项一项列的,不符合平常的学习习惯。
VIM和VI的之间有联系吗?
谢谢了!
上次由 dvdface 在 2007-08-30 12:43,总共编辑 2 次。
-
- 帖子: 48
- 注册时间: 2006-07-11 14:43
-
- 帖子: 152
- 注册时间: 2006-08-16 22:19
- 来自: 湖北武汉
- 联系:
- ectotherm
- 帖子: 225
- 注册时间: 2006-05-23 13:35
- 联系:
-
- 帖子: 152
- 注册时间: 2006-08-16 22:19
- 来自: 湖北武汉
- 联系:
- ectotherm
- 帖子: 225
- 注册时间: 2006-05-23 13:35
- 联系:
-
- 帖子: 12
- 注册时间: 2006-09-10 15:02
- 联系:
- ectotherm
- 帖子: 225
- 注册时间: 2006-05-23 13:35
- 联系:
-
- 帖子: 152
- 注册时间: 2006-08-16 22:19
- 来自: 湖北武汉
- 联系:
其实是我的电脑慢,Eclipse当然快不起来了。ectotherm 写了:你的问题还不少啊,cout endl 在 std 中,要写 std:: 前缀或者要 using namespace std;
不要说 eclipse 的坏话,这里有 eclipse 的粉丝的。我虽然不用但是也不反对 eclipse -- 它是 Linux 上不多的 gui 做得漂亮的工具。
vim 是 vi 的发展,当然现在也可以用 vi 但是很快你就会发现还是 vim 好。至于语法高亮,在 ~/.vimrc 中写 syntax on 就好了。
还要说的是 eclipse 不算太慢了,比 awt swing 的程序好多了。
-
- 帖子: 7
- 注册时间: 2007-05-13 1:52
- madoldman
- 帖子: 599
- 注册时间: 2006-02-27 20:19
- 来自: works system
- 联系:
-
- 帖子: 39
- 注册时间: 2007-07-24 20:40
- 联系: