We help IT Professionals succeed at work.

a.out dont work

jerntat
jerntat asked
on
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
Comment
Watch Question

Commented:
type:
./a.out

Its a path thing

Author

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

Explore More ContentExplore courses, solutions, and other research materials related to this topic.