Seed the random number generator on startup.

This commit is contained in:
casey langen 2017-02-05 23:10:07 -08:00
parent 3a9f69e097
commit f88896d0ac

View File

@ -34,6 +34,9 @@
#include "stdafx.h"
#include <stdlib.h>
#include <time.h>
#include <cstdio>
#include <cursespp/App.h>
@ -88,6 +91,8 @@ int _main(int argc, wchar_t* argv[])
int main(int argc, char* argv[])
#endif
{
srand((unsigned int) time(0));
/* the following allows boost::filesystem to use utf8 on Windows */
std::locale locale = std::locale();
std::locale utf8Locale(locale, new boost::filesystem::detail::utf8_codecvt_facet);