Pay attention to unformatted nature of getline -- Marco Arena
A simple stream function like getline can lead to undesirable behavior:
Pay attention to unformatted nature of getline
by Marco Arena
From the article:
Some years ago that piece of code was migrated to C++ streams (since files to read were really small and simple) and a silly bug was introduced...


If you want your C++ code to run on the web, there is Emscripten, but there is also Cheerp: