1

I have tried to find a solution that make batch file start flashing on taskbar and only good solution was this post on Stack Overflow.

But I can't compile the code with WinGW or anything else to EXE, only getting this error:

hello.cpp:6:32: error: '::main' must return 'int'

Right now, I'm using TDM-GCC to compile code, because it's bit better...

Can somebody give me code that actually works or even better compile it to EXE already?

P.S. Even more better if somebody could compile this Delphi code, because I can't find any software that's free.

EDIT: I just go hell with it and downloaded Delphi trial and complied the delphi code and it worked! Sorry guys for bugging you unnecessarily :/ You can close this.

Community
  • 1
  • 1
user1886578
  • 27
  • 1
  • 1
  • 3

1 Answers1

7

It's actually int main(), and the end must return an integer (so make the last line above "}" return 0; (indicates a successful run, anything non-zero is otherwise).

#include <iostream>
using namespace std;
int errors;

int main(arg stuff) {
    std::cout << "C++!";

    if (errors > 0)
         return 1;

    return 0;
}
nerdwaller
  • 1,813
  • 1
  • 18
  • 19