Topic: STL : map & string key


Author: Denis MENARD <denis.menard@isdnet.net>
Date: 1998/02/06
Raw View
I'm unable to link such programm with Visual C++ 5.0:

#include <string>
#include <map>

using namespace std ;

typedef map<string, int> StringMap ;

void main()
{
 StringMap my_map ; // Ko on link (internal error) !!!!
}

WHY???
Thanks for your to reply par e-mail too! :-o



[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: "Brock" <peabody@npcinternational.com>
Date: 1998/02/06
Raw View
I compiled and linked your code as is in VC 5.0 without any problems.  If
you really are getting 'internal' compiler error, maybe you should conact
MS, your code should compile and link ok(on MSVC at least- void main() is
not standard c++).


Denis MENARD wrote in message <34DB5B4B.4F28C3CA@hol.fr>...
>I'm unable to link such programm with Visual C++ 5.0:
>
>#include <string>
>#include <map>
>
>using namespace std ;
>
>typedef map<string, int> StringMap ;
>
>void main()
>{
> StringMap my_map ; // Ko on link (internal error) !!!!
>}
>
<<<



[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]