Lint cannot recognize std :: string class

I am trying to use my project. But it looks like Lint can't recognize classes like std::string

, std::vector

and std::queue

. I am using a config file as well lib-std.lnt

, but useless when facing errors like the following.

Error 40: Raw id 'queue'

Error 40: Undeclared identifier 'string'

Error 10: Waiting for a structure or union

Does anyone know how to fix the problem?


for sample code: -

#include<string>

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

      

=================================== and the output is as follows:


/>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 ';'

      

+1


source to share





All Articles