Link to home
Start Free TrialLog in
Avatar of jerntat
jerntat

asked on

a.out dont work

I try to compile the code :

#include <stdio.h>
#include <iostream.h>

int main()
{
 cout<<"test"<<endl;

 return 0;
}

save in file test.cc by uising the command:

g++ test.cc

on redhat linux.

I get the a.out file but when i type a.out the computer give :

bash : command not found

or something like that. When i try

g++ test.cc -o test

and run test, i just get another empty prompt.Please help
ASKER CERTIFIED SOLUTION
Avatar of bearware
bearware
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jerntat
jerntat

ASKER

I just got the answer from my friend. But thanks!