Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The Rust version adds a newline (hence println) while the C++ version doesn't. Either the Rust version should use `print!`, or the C++ version needs an `<< std::endl`


Adding '\n' to the string is perfectly fine, no std::endl needed (\n translates to the system-specific newline and the stream is flushed on destruction anyways).




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: