I'm trying to write in a file some numbers separated by an indentation (c++) so I can read them after using Python by numpy loadtxt function. What is the most effective way to add an indentation in C++? I might think a comma should work too. This is what I have (not separated):
ofstream qfit ;
qfit.open("qfit.dat") ;
qfit << freq_si <<star.mom_quad() << star.angu_mom() ;
qfit.close();
Add a '\\t' or change the delimiter. By @NathanOliver
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.