Topic: Help on Container


Author: AllanW@my-dejanews.com
Date: 1998/06/17
Raw View
In article <6m69fq$d2m$1@flood.weeg.uiowa.edu>,
  "Zhiyong Lu" <zlu@neural.com> wrote:
>
> Hi, there
> I tried to compiler the following code which I copied from
> Bjarne's C++ Programming Language (3rd Edition) using
> VC++5.0 on Windows NT4.0.
>
> #include <iostream>
> #include <string>
> #include <vector>
> using namespace std;
>
> struct Entry {
>  string name;
>  int number;
> };
>
> int main () {
>     vector<Entry>phone_book(1000);
>     return 0;
> }
>
> I got errors as follows:
[snip errors all in <xutility>]
> stest.exe - 12 error(s), 0 warning(s)
>
> I couldn't figure it out! Would you please tell me the reason ?

This program compiled for me with no warnings, no errors.

It could be that your header file <xutility>, or some other header file,
is corrupt.  It's much more likely that you've simply got an old version of
the Standard Template Library.  Either way, get Service Pack 3 from
Microsoft, and/or download the new version of the Standard Template Library
from  http://www.sgi.com/Technology/STL/

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


[ 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              ]