Answers for "error: 'std::high_resolution_clock' has not been declared"

C++
0

error: 'std::high_resolution_clock' has not been declared

#include <chrono>
using std::chrono::high_resolution_clock;
using std::chrono::microseconds;
using std::chrono::duration_cast;

auto start = high_resolution_clock::now();
rd(n);
auto stop = high_resolution_clock::now();
auto duration = duration_cast<microseconds>(stop-start);
std::cout << duration.count() << std::endl;
Posted by: Guest on October-30-2020

Code answers related to "error: 'std::high_resolution_clock' has not been declared"

Browse Popular Code Answers by Language