This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| auto start = std::chrono::high_resolution_clock::now(); | |
| //... | |
| auto elapsed = std::chrono::high_resolution_clock::now() - start; | |
| long long microseconds = std::chrono::duration_cast<std::chrono::microseconds>(elapsed).count(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <random> | |
| std::random_device rseed; | |
| std::mt19937 rgen(rseed()); // mersenne_twister | |
| std::uniform_int_distribution<int> idist(0,100); // [0,100] | |
| std::cout << idist(rgen) << std::endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dir $path$\*.txt /b /a-d >files.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wchar_t *convertCharArrayToLPCWSTR(const char* charArray) | |
| { | |
| wchar_t* wString=new wchar_t[4096]; | |
| MultiByteToWideChar(CP_ACP, 0, charArray, -1, wString, 4096); | |
| return wString; | |
| } |