i am very new to linux
using ubuntu os
i know only turbo c++ programs i want to run turbo c++
program in linux gnu
how do i know whether i have gnu software in my linux
We have gnu compiler collection in GNU\Linux. Gcc is one of the most robust c compilers in the world. You can use it in place of turboc or if you need an IDE, use Anjuta. Use synaptic to install anjuta and start using it.
Gcc is the compiler present in Linux...Install it using synaptic ...
Just select build-essential packages it will install gcc also...
how to detect gcc in linux
and how to install
i dont know how to install in linux
Open synaptic and install it by selecting on gcc....Search for it in synaptic if you can`t find it.
also give
$gcc --version
to get the version, since it's ubuntu 5.10 it might be 3.4 :roll: Just a guess.
what is synaptic how to install that
i am getting this
which guess i have gcc
but how to run c+ file
in the terminal
gcc (GCC) 3.3.4 (Debian 1:3.3.4-9ubuntu5)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
btw, he asked for a c++ compiler. gcc is gnu c compiler. try th following for a cpp file
g++ <filename.cpp>
after successful compilation
./a.out
for running the program
i am writing this program as demo
#include<conio.h>
#include<iostream.h>
#include<stdio.h>
using namespace std;
int main()
{
cout<<"hello";
return 0;
}
ok how to use other header files in gcc
conio.h is not present in gcc... What other header files do you want to use...
Borland' C/C++ compiler's a little different eg graphics.h etc is not a defacto thus not present in g++.Now many books for eg Cpp for Dummies etc cites examples been compiled on using gcc either in Windows OS or Linux.In windows some minimalist gnu...mingw32 etc should be installed.