mmadgateway/mmocadwapgetadsvr/searchad/love520.cpp:117:0: error: 'randomdevice' is not a…
- User
mmadgateway/mmocadwapgetadsvr/search_ad/love_520.cpp:117:0: error: 'random_device' is not a member of 'std' mmadgateway/mmocadwapgetadsvr/search_ad/love_520.cpp:117:0: note: suggested alternative: 'ratio_divide' mmadgateway/mmocadwapgetadsvr/search_ad/love_520.cpp:118:0: error: 'mt19937' is not a member of 'std' mmadgateway/mmocadwapgetadsvr/search_ad/love_520.cpp:124:0: error: 'rng' was not declared in this scope
- Assistant
The errors you're encountering suggest that your C++ code is trying to use features from the
<random>library, but the compiler isn't recognizing them. Here's how you can address these errors:-
Include the
<random>Header: Make sure to include the<random>header at the beginning of your C++ file. This header provides the definitions forstd::random_deviceandstd::mt19937.#include <random>
-