Last active
July 6, 2017 08:51
-
-
Save MikeLing/c5d618c176a14aec06f3411ce1b30c5e to your computer and use it in GitHub Desktop.
This file contains 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
// in init.hpp | |
__init32_t global_random_seed = CRandom::generate_seed(); | |
// in CRanomd.hpp | |
extern __init32_t global_random_seed; | |
CRandom::CRandom() : m_sfmt_32(NULL), | |
m_sfmt_64(NULL),m_dsfmt(NULL) | |
{ | |
// in this way, I will get undefined symbols for architecture x86_64 c++ error. | |
m_seed = global_random_seed; | |
init(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment