On Thu, 27 Jun 2002, faisal gillani wrote:

> hello there i have started using mandrake as one of my
> normal usage O/S but i still cannot make out how to do
> development in c++ for example in my windows i have
> turbo c 3 which i use IDE to develop programs 
> if i want to make a program as follows how can i make
> & complie it ?
> 
> #include<studio.h>
> #include<conio.h>
> 
> void main (void)
> {
> printf ("Hello world");
> }
> 
> i have installed gcc in my mandrake 
> thanks for reading my mail 

A few things:
  You're including <studio.h> instead of <stdio.h>.
  Your example looks to be in c, not c++.

  Use g++ to compile c++ programs. E.g. 

  ----
  #include <iostream.h>

  int main()
  {
        cout << "Hello, World!" << endl;
        return 0;
  }
  ----

  g++ -o hello hello.C

  For a c program:

  ----
  #include <stdio.h>

  int main(void)
  {
    printf("Hello, World!\n);
        return 0;
  }

  ----

  gcc -o hello hello.c


  BTW, conio.h is a DOSism. It's unneeded in this hello program. If you
  do need screen clear and cursor positioning, look into the ncurses
  library instead.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to