STL Newbie: STL maps 
Author Message
 STL Newbie: STL maps

Hi!

We have an ATL COM project (Service EXE) and I want to use STL maps instead
of CMap in MFC . I created a structure and wanted an integer to map to it.

// BEGIN CODE:
typedef struct user_info {
    char name[10];
    char addr[50];

Quote:
} USER_INFO;

typedef map <int, USER_INFO*, less<int> > mapINT2INFO;

mapINT2INFO userdata;

// END CODE:

The thing is, when I build the project, WARNING C4786 keeps showing up in my
project and the ATLCOM.h file. I'm not sure if I defined the types correctly
and I've placed a #pragma warning(disable:4786).

I've never used STL before, and I was wondering if anyone can help me out.

Regards,
Tennyson



Tue, 08 May 2001 03:00:00 GMT  
 STL Newbie: STL maps
Just ignore it, its harmless and you are not doing anything wrong, the debug
symbols are over 255 chars long which is out of your control. This truncation
warning is annoying and its not easy to get rid of it, just placing a warning(
disable ) in the header doesn't work.

Best Regards,
Alen

Quote:

> Hi!

> We have an ATL COM project (Service EXE) and I want to use STL maps instead
> of CMap in MFC . I created a structure and wanted an integer to map to it.

> // BEGIN CODE:
> typedef struct user_info {
>     char name[10];
>     char addr[50];
> } USER_INFO;

> typedef map <int, USER_INFO*, less<int> > mapINT2INFO;

> mapINT2INFO userdata;

> // END CODE:

> The thing is, when I build the project, WARNING C4786 keeps showing up in my
> project and the ATLCOM.h file. I'm not sure if I defined the types correctly
> and I've placed a #pragma warning(disable:4786).

> I've never used STL before, and I was wondering if anyone can help me out.

> Regards,
> Tennyson



Fri, 11 May 2001 03:00:00 GMT  
 STL Newbie: STL maps

Quote:
>The thing is, when I build the project, WARNING C4786 keeps
showing up in my
>project and the ATLCOM.h file. I'm not sure if I defined the
types correctly
>and I've placed a #pragma warning(disable:4786).

This is what Microsoft coders do themselves. I found the same
in some sample code. Go ahead!

Eugene Novikov / ANTEC



Sat, 12 May 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Newbie question: How To Make a map (stl or ATL) with BSTRs

2. stl::map - can't map int to char *

3. MFC map or stl map

4. Conflict between VC 7 STL and SGI STL - how to resolve

5. ATL conflict between VC 7 STL and SGI STL - how to resolve

6. typedef'ing iterators in MSVC's STL (not the HP STL)

7. MFC + STL < STL

8. Porting code from SGI STL to MSVC STL

9. SGI-STL or STL of VC++

10. STL header files vs non-STL header files

11. Which STL should I replace VC6 STL with?

12. STL or not to STL

 

 
Powered by phpBB® Forum Software