String list 
Author Message
 String list

The following program causes many compilation warnings. How can I resolve
them?

----------------------------------------------------------------------
#include <list>
#include <string>

using namespace std;

void main(void)
{
 list<string> xyz;

Quote:
}

------------------------------------------------------------------
Compiling...
list1.cpp
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\list(125) : warning
C4786:
_
t

c

the browser information
        C:\MyProjects\bigfile\list1.cpp(8) : see reference to class template
instantiation 'std::list<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class
std::allocator<class std::basic_string<char,struct st
d::char_traits<char>,class std::allocator<char> > > >' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\list(128) : warning
C4786:
?
$
?

characters in the browser information
        C:\MyProjects\bigfile\list1.cpp(8) : see reference to class template
instantiation 'std::list<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class
std::allocator<class std::basic_string<char,struct st
d::char_traits<char>,class std::allocator<char> > > >' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\list(137) : warning
C4786:
$



s

was truncated to '255' characters in the browser information
        C:\MyProjects\bigfile\list1.cpp(8) : see reference to class template
instantiation 'std::list<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class
std::allocator<class std::basic_string<char,struct st
d::char_traits<char>,class std::allocator<char> > > >' being compiled



Sun, 02 Nov 2003 00:45:48 GMT  
 String list

You get this warning because the identifiers generated by STL are too long for
VC.

Use
#pragma warning( disable: w1 w2 ...  )
 where w1, w2 are warning numbers that disturbs you ( in this case only 4786 ),
but don't get to carried away :).

To reenable them use
#pragma warning( default: w1 w2 ...  )

Good luck!

Quote:

> The following program causes many compilation warnings. How can I resolve
> them?

> ----------------------------------------------------------------------
> #include <list>
> #include <string>

> using namespace std;

> void main(void)
> {
>  list<string> xyz;

> }
> ------------------------------------------------------------------
> Compiling...
> list1.cpp
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\list(125) : warning
> C4786:
_
t

c

> the browser information
>         C:\MyProjects\bigfile\list1.cpp(8) : see reference to class template
> instantiation 'std::list<class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> >,class
> std::allocator<class std::basic_string<char,struct st
> d::char_traits<char>,class std::allocator<char> > > >' being compiled
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\list(128) : warning
> C4786:
?
$

?

> characters in the browser information
>         C:\MyProjects\bigfile\list1.cpp(8) : see reference to class template
> instantiation 'std::list<class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> >,class
> std::allocator<class std::basic_string<char,struct st
> d::char_traits<char>,class std::allocator<char> > > >' being compiled
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\list(137) : warning
> C4786:
$



s

> was truncated to '255' characters in the browser information
>         C:\MyProjects\bigfile\list1.cpp(8) : see reference to class template
> instantiation 'std::list<class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> >,class
> std::allocator<class std::basic_string<char,struct st
> d::char_traits<char>,class std::allocator<char> > > >' being compiled

--
Paul Marculescu


Sun, 02 Nov 2003 01:10:00 GMT  
 String list
See KB Article Q122539 "BUG: C4786 or C1067 Caused by Long Identifier and
/Zi"
--
With best wishes,
    Igor Tandetnik



Quote:
> The following program causes many compilation warnings. How can I resolve
> them?

> ----------------------------------------------------------------------
> #include <list>
> #include <string>

> using namespace std;

> void main(void)
> {
>  list<string> xyz;

> }
> ------------------------------------------------------------------
> Compiling...
> list1.cpp
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\list(125) : warning
> C4786:

_
t
c
Quote:

in
> the browser information
>         C:\MyProjects\bigfile\list1.cpp(8) : see reference to class
template
> instantiation 'std::list<class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> >,class
> std::allocator<class std::basic_string<char,struct st
> d::char_traits<char>,class std::allocator<char> > > >' being compiled
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\list(128) : warning
> C4786:

?
$
Quote:


?
Quote:

> characters in the browser information
>         C:\MyProjects\bigfile\list1.cpp(8) : see reference to class
template
> instantiation 'std::list<class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> >,class
> std::allocator<class std::basic_string<char,struct st
> d::char_traits<char>,class std::allocator<char> > > >' being compiled
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\list(137) : warning
> C4786:

$

s

- Show quoted text -

Quote:

identifier
> was truncated to '255' characters in the browser information
>         C:\MyProjects\bigfile\list1.cpp(8) : see reference to class
template
> instantiation 'std::list<class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> >,class
> std::allocator<class std::basic_string<char,struct st
> d::char_traits<char>,class std::allocator<char> > > >' being compiled



Sun, 02 Nov 2003 01:17:42 GMT  
 String list

Quote:

> You get this warning because the identifiers generated by STL are too
> long for VC.

STL doesn't generate identifiers, the compiler does. And that's really
where the problem lies: the compiler generates names that are too long
for the de{*filter*}, so it truncates them and warns you.

--
Pete Becker
Dinkumware, Ltd. ( http://www.*-*-*.com/ )



Sun, 02 Nov 2003 01:26:11 GMT  
 String list

Quote:


> > You get this warning because the identifiers generated by STL are too
> > long for VC.

> STL doesn't generate identifiers, the compiler does. And that's really
> where the problem lies: the compiler generates names that are too long
> for the de{*filter*}, so it truncates them and warns you.

You're right. My mistake.
But I hope the man got the point.

Quote:

> --

--
Paul Marculescu


Sun, 02 Nov 2003 19:00:03 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How Can I get string list from interface?

2. String List

3. string list

4. Hashed string list

5. Insert string into list position

6. search and replace strings with lists

7. problems with a string linked list program and pointers

8. Strings and Linked List

9. convert list to array, arrays of pointers (to strings)

10. C library for string and list???

11. A way to manage a list of strings?

12. Parsing a string with numbers (reading a graph's adjacency list)

 

 
Powered by phpBB® Forum Software