Linux CLion can't resolve namespace member

冷暖自知 提交于 2019-12-23 01:01:11

问题


#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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!