Hi all! A long time ago I made a few simple hello world apps in c++ but nothing fancy. Now I've been to java classes for a while and thought I would try some more c++ however I can't run even the simplest hello world applications!
Code:
#include <iostream>
using namespace std;
int main()
{
cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
cin.get();
return 1;
}
The code is taken from http://www.cprogramming.com/tutorial/lesson1.html. I compile this using "g++ -c hello.cpp -o output" and it works fine but when I try to run it, just doing "./output" it just wont start! All I get is
Code:
bash: ./output: cannot execute binary file
What does this mean? I just don't get it, am I not compiling it right?
Bookmarks