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
c ++ stl pc-lint


source to share


No one has answered this question yet

See similar questions:

3
Problems with PC-LINT and gcc 4.8 / STL (on Ubuntu)

or similar:

2873
How do I iterate over the words of a string?
2437
Why "using the std namespace;" considered bad practice?
1455
Easiest way to convert int to string in C ++
838
How can I convert std :: string to const char * or char *?
753
What's the best way to truncate a std :: string?
696
How can I convert std :: string to lowercase?
651
std :: wstring VS std :: string
616
How do I concatenate std :: string and int?
606
Combining two std :: vectors
403
std :: string formatting like sprintf



All Articles
Loading...
X
Show
Funny
Dev
Pics