It is necessary to bring the table to the file stream. Integers are formatted with spaces. How to disable it, I have a column delimiter - a space.
#include <fstream> #include <locale> int main() { std::locale::global(std::locale("")); auto file = std::wofstream("table.txt", std::ios::out | std::ios::trunс); for(const auto & line : getLines()) { for(const auto & value : line) { file << L' ' << value; } file << L'\n'; } return 0; } An example of a row of 4 columns {integer, row, integer, real}, the first column has the type INT64 ( signed __int64 ):
1 235 346 563 356 523 234 ready 43 0.5903
std::locale::global(std::locale("C")); std::cout.imbue(std::locale());std::locale::global(std::locale("C")); std::cout.imbue(std::locale());. - VladD