• vapeloki@lemmy.world
    link
    fedilink
    arrow-up
    39
    ·
    9 天前

    std::endl is used in output streams in C++ to end the line, using the os specific line termination sequence, and flush the buffer.

    The later one is a performance issue in many cases, why the use of "\n" is considered preferred