多读书,多做事,广交朋友,趣味丛生
分类: LINUX
2010-09-08 20:09:02
When it comes to programming(C/C++ or other ),Ubuntu 10.04 or any distribution of Linux is far better than Windows NT based Operating system(windows XP or Vista or 7).In general people uses TurboC++ on windows but in Ubuntu 10.04 advanced and much efficient compiler are available for compiling C or C++ programs.Some people or students think that programing in Linux is very tough(Actually they feel scary due to the shell Commands) but I assure you that it is nothing but a misconception.But now,I think the misconceptions are decreasing and they are becoming familiar with Ubuntu/linux environment.
Text Editor in Ubuntu 10.04
Since Ubuntu 10.04 uses GNOME as their default desktop so there is no
need to worry about text editor because Gedit text editor is installed
by default.It has many advanced features like Syntax coloring so it is
well suited for programming.Another KDE based version is also available
Kwrite,similar to gedit with lot of features.
C Compiler for Ubuntu 10.04
For C program there is a modern compiler GCC(GNU Compiler Collection)
which you can use to compile C programs.To install gcc type following
command at command line.(It may be installed already)
sudo apt-get install gcc
Compiling C program in Ubuntu 10.04
user1004@user1004-desktop:~/Desktop$ gcc abc.c
user1004@user1004-desktop:~/Desktop$ ./a.out
*********Hello! Mr.X it’s working Enjoy!!******
user1004@user1004-desktop:~/Desktop$
C++ Compiler for Ubuntu
For C++ programs you can use G++ compiler an advanced compiler with lot
of features.To install G++ type following command at command line.
sudo apt-get install g++
Compiling C++ program in Ubuntu 10.04
user1004@user1004-desktop:~/Desktop$ g++ decbin2.cpp
user1004@user1004-desktop:~/Desktop$ ./a.out
Enter the decimal number to be converted
23
The Equivalent binary number is 010111
user1004@user1004-desktop:~/Desktop$
IDE(Integrated Developement Environment) for programming in C and C++
For programming in c++ these are the most widely used IDE’s