Including <random> header
已回答
Hi, I am trying to do a program and CLion gives me an error that it cannot find the #include <random> header, can someone help me with this. I tried to google it, but could not find a solution. Thanks!
请先登录再写评论。
Hello!
On what OS do you use CLion? What compiler do you use? Please attach a screenshot of `File | Settings | Build, Execution, Deployment | Toolchains` (please capture the screenshot after the compiler detection is completed).
HI,
I am using Windows 10. The compiler is Cygwin.
Please do the following:
1. `File | Close Project`;
2. On the Welcome screens select `New Project` > `C++ Executable` > `Create`;
3. In the created project add #include <random> to main.cpp.
Do you get the error in this case?
It works, but the thing is I am not doing a C++ program but a C one.
It's a C++ header, not a C one - https://en.cppreference.com/w/cpp/header/random.