Lint unable to recognizing std::string class

五迷三道 提交于 2019-12-08 02:22:09

问题


I am trying to lint my project. But it seems like Lint is unable to recognize the classes such as std::string, std::vector and std::queue. I am using lib-std.lnt config file as well but of no use, facing the errors like following.

Error 40: Undeclared identifier 'queue'

Error 40: Undeclared identifier 'string'

Error 10: Expecting a structure or union

Does any one know how to resolve the issue?


for sample code :-

#include<string>

int main(void) 
{
    std::string str;  
    return ;
}

=================================== and the out put is as following


/>lint-nt -iC:\ghs\comp_20121\ansi  proj2.lnt snip.cpp
PC-lint for C/C++ (NT) Vers. 8.00x, Copyright Gimpel Software 1985-2008

--- Module: snip.cpp (C++)

typedef wchar_t _Wchart;

C:\ghs\comp_20121\scxx\yvals.h:747  Warning Error 10: Expecting ';'

C:\ghs\comp_20121\scxx\yvals.h:747  Warning Error 19: Useless Declaration

std::string str;

snip.cpp:4  Warning Error 40: Undeclared identifier 'string'

snip.cpp:4  Warning Warning 522: Expected void type, assignment, increment or decrement

snip.cpp:4  Warning Error 10: Expecting ';'

来源:https://stackoverflow.com/questions/14837125/lint-unable-to-recognizing-stdstring-class

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