Simple Programs Compiling but no output.

Hi there, beginner here, here is a sample selection of code I am having trouble with. I am using g++ with Sublime Text 2 to compile, and although the following code does compile, "Hello" is not outputted in DOS. I run "test" (name of file) and nothing happens. Any help would be appreciated. (I tried this with various simple programs like this, no output, but compiles fine.

1
2
3
4
5
6
7
8
9
  #include <iostream>
#define OUTPUT "Hello"
 
int main()
{
	using namespace std;
	cout << OUTPUT << endl;
	return 0;
}
i wouldn't use hash defines and line 6 would be better on line 3. but other than that, it outputs just fine for me. (visual studio 2013).
i.e. it's not your code.
Last edited on
I'm an idiot. In DOS I was naming the compile command differently then what I was typing in. How embarrassing.
Topic archived. No new replies allowed.