Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2219 std::endl results in crash

OTHER
unread
nobody
Support
none
Unknown
False
2014-08-14
2014-06-18
Nils Ehmke
No

I tried to compile following program

#include <iostream>

int main () {
    for (int idx = 0; idx < 5; idx++) {
        std::cout << "Hello World" << std::endl;
    }
    return 0;
}

using the following commands

g++ example.cpp -o example.exe
example.exe

The program crashes with a meaningful report from Windows that the program just stopped to work. If I remove std::endl the program does not crash though.

Could be related to #1678 - however there is no solution in the given ticket that would solve my problem.

Discussion