file extension for c++

Oct 15, 2009 at 9:27pm
im losing my mind over this :x

i use vista,

what would the file extension be for the following?

// my first program in C++

#include <iostream>
using namespace std;

int main ()
{
cout << "hello world!";
return 0;
}
Oct 15, 2009 at 9:36pm
.cpp

But my guess is that you're trying to run the source file directly. Am I right?
Oct 15, 2009 at 9:40pm
yes
Oct 15, 2009 at 9:47pm
You need to compile your code: http://www.cplusplus.com/forum/articles/7263/
Oct 15, 2009 at 9:53pm
thank you
Topic archived. No new replies allowed.