src/main.cpp
/*
* set (or rather, unset) some sensible basics.
* specifically: unset the internal buffer of cout and cin,
* and force both to use the default locale.
* std::locale* is in general pretty awful, but it gets the job done.
*/
set (or rather, unset) some sensible basics.
specifically: unset the internal buffer of cout and cin,
and force both to use the default locale.
std::locale* is in general pretty awful, but it gets the job done.
set ( or rather unset ) some sensible basics . specifically : unset the internal buffer of cout and cin and force both to use the default locale . std :: locale * is in general pretty awful but it gets the job done .
static void prepare_io()
{
    std::cout.rdbuf()->pubsetbuf(0, 0);
    std::cin.rdbuf()->pubsetbuf(0, 0);
    std::cout.imbue(std::locale());
    std::cin.imbue(std::locale());
    std::cin.tie(nullptr);
}
static void prepare_io ( ) { std :: cout . rdbuf ( ) -> pubsetbuf ( 0 , 0 ) ; std :: cin . rdbuf ( ) -> pubsetbuf ( 0 , 0 ) ; std :: cout . imbue ( std :: locale ( ) ) ; std :: cin . imbue ( std :: locale ( ) ) ; std :: cin . tie ( nullptr ) ; }
set (or rather, unset) some sensible basics.
set ( or rather unset ) some sensible basics .