The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 03-05-2002
AtleRamsli AtleRamsli is offline
Registered User
 

Join Date: Feb 2002
Location: Brabant, Belgium
Posts: 65
What kind of system is this?
I have two comments: You need a space between -o and the binay file, like this: -o ut
The file will then be called ut.
Also, cpp is an unusual extension, most often c++ program either have .c++ or .C as extension, whereas C files have .c.

Try to create the file tst.C:
#include <iostream.h>
main
{
cout << "Hello\n";
}

Then compile:

$ g++ tst.C -o tst

Then run
$ ./tst

If there is still no go, you may have a non-standard system.

BTW: CPP is the C PreProcessor, shows you the code after macro expansions,etc.

Atle
__________________
PS
All of the above is to be read as '... unless I am wrong'
ENDPS
Reply With Quote