问题
#include <iostream>
#include <stdlib.h>
int main()
{
std::srand( time(0) );
return 0;
}
Error message
This code compiles and run fine. But error messsage doesn't disappear and it annoys me. Maybe someone solved this problem.
My system info.
Linux desktop 4.6.4-1-ARCH #1 SMP PREEMPT Mon Jul 11 19:12:32 CEST 2016 x86_64 GNU/Linux
g++ (GCC) 6.1.1 20160707
P.S. The problem appears with included cstdlib. I think the problem in the IDE.
回答1:
Solved using C++ 11 < random >
回答2:
See https://youtrack.jetbrains.com/issue/CPP-7573 According to the bugtracker, it is supposed to be fixed in "2016.3.2 EAP"
来源:https://stackoverflow.com/questions/38674349/linux-clion-cant-resolve-namespace-member