Help! Empty output when I compile a simple code

Hello.

I am a beginner of c++. I am having problems running a simple "hello world" that codelite IDE generate automatically when you create a new proyect.

When i compile the code i have 0 error but the output is empty when I run it only the black screen sets visible but no data. Then It shows: "Program exited with return code: -1073741510" what does that error means?

I Have tried to install other compilers without no results. Actually I am using MinGW Minimalist GNU for Windows.

Also I have tried to use Dev ++ IDE and i have the same problem.. Black screen with no info. What else can I do?

Sorry for my english folks.

1
2
3
4
5
6
7
8
9
 #include <stdio.h>

int main(int argc, char **argv)
{
	printf("hello world\n");
    return 0;

}
Last edited on
Make sure you are selecting a Console Application project -- because the default is probably a Win32/GUI application, which behaves differently.

Also, your example is a C program. Here's the equivalent C++ program:

1
2
3
4
5
6
7
#include <iostream>

int main()
{
  std::cout << "hello world\n";
  return 0;
}

Make sure to run this from the command prompt or you might not see anything at all -- if you do, you'd only see a new console window flashing in and out of existence.

(When you run it from the command prompt the console window won't disappear and you'll see your program's output.)

Hope this helps.
Topic archived. No new replies allowed.