#include<fstream> fstream wf("out.dat",ios::out | ios::trunc); // fstream ofs; ofs.open("out.dat", ios::out | ios::trunc);
Interested in particle astrophysics and plasma astrophysics. This blog is my research/private notebook.
Tuesday, November 6, 2018
Deal with file by C++
Sunday, November 4, 2018
Delay the program some time with C++
#include <chrono> #include <thread>REFERENCE:int main(){ using namespace std::this_thread; /*sleep_for, sleep_until */ using namespace std::chrono; /* nanoseconds, system_clock, seconds */ sleep_for(nanoseconds(10)); //sleep_until(system_clock::now() + seconds(1)); }
https://stackoverflow.com/questions/158585/how-do-you-add-a-timed-delay-to-a-c-program
Subscribe to:
Posts (Atom)