1

I recently reinstalled my system, this time with Windows 10 (was on Windows 8.1, winload went bad -- but I digress). I've since been working on recreating my setup, including cygwin. I'm now having issues with cygwin's handling of I/O in C and C++ (using gcc and g++). The following programs both hang my cygwin terminal, without any output:

C code:

#include <stdio.h>

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

C++ code:

#include <iostream>

using namespace std;

int main() {
    cout << "Hello, world!" << endl;
    return 0;
}

I need to be able to use g++ locally for a programming assignment, but neither gcc nor g++ are working properly! Help?

  • You could build these code, but they did not run. Or you couldn't build? – Viet Nov 27 '15 at 06:36
  • The programs both built fine. They just hung when trying to execute. Disabling Avast per the linked answer (http://stackoverflow.com/questions/33690697/running-my-c-code-gives-me-a-blank-cmd) solved the problem. – mountiealpha Nov 27 '15 at 07:47
  • In my experience, never have any form of anti-virus software installed, particularly not when programming. Virus are best avoided by not downloading them to your computer... – Lundin Nov 27 '15 at 07:51

0 Answers0