I am trying to compile simple program under linux. These are the set of operations I performed.
[mypc@localhost programs]$ vim heap.cpp
[mypc@localhost programs]$ g++ -c heap.cpp
[mypc@localhost programs]$ chmod 777 heap.*
[mypc@localhost programs]$ g++ -c heap.cpp
[mypc@localhost programs]$ ./heap.o
bash: ./heap.o: Permission denied
[mypc@localhost programs]$ ls
heap.cpp heap.o
[mypc@localhost programs]$ ls -l
total 8
-rwxrwxrwx. 1 mypc mypc 67 2009-12-28 12:01 heap.cpp
-rw-rw-r--. 1 mypc mypc 1548 2009-12-28 12:02 heap.o
[mypc@localhost programs]$ chmod 777 heap.o
[mypc@localhost programs]$ ./heap.o
bash: ./heap.o: cannot execute binary file
[mypc@localhost programs]$
What kind of error is this ?
Here is a program
#include<iostream>
using namespace std;
int main(){
return 0;
}