From: Martin Ambuhl Newsgroups: comp.os.msdos.djgpp Subject: Re: STL Date: Sun, 16 May 1999 05:06:20 -0400 Content-Transfer-Encoding: 7bit References: <373B3FD7 DOT 7D692AD2 AT alphalink DOT com DOT au> X-Posted-Path-Was: not-for-mail X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-ELN-Date: 16 May 1999 09:05:08 GMT X-ELN-Insert-Date: Sun May 16 02:15:02 1999 Organization: Nocturnal Aviation Lines: 52 Mime-Version: 1.0 NNTP-Posting-Host: dialup-209.246.66.187.newyork2.level3.net Message-ID: <373E8A8C.87D93E54@earthlink.net> X-Mailer: Mozilla 4.51 [en] (Win95; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "T.B." wrote: > > Hello, > > I have to study STL this semester. The below code is from my text book. 1) Get a book whose author knows that main returns an int 2) I don't know why, but these headers will solve your problem: #include #undef __STL_MEMBER_TEMPLATES #include #include > > /* prog1.cpp, start here */ > > #include > #include > > void display(const vector v); > > void main() > { > vector vec1(3,11); This is the line leading to the diagnostics. so [snip] > I compiled the above by typing: gxx -s -o prog1.exe prog1.cpp > but DJGPP gave error messages as follow > > e:/djgpp/lang/cxx/stl_vector.h:113: no type named `iterator_category' in > `int' > e:/djgpp/lang/cxx/stl_vector.h:113: no type named `value_type' in `int' > e:/djgpp/lang/cxx/stl_vector.h:113: no type named `difference_type' in > `int' > e:/djgpp/lang/cxx/stl_vector.h:113: no type named `pointer' in `int' > e:/djgpp/lang/cxx/stl_vector.h:113: no type named `reference' in `int' > e:/djgpp/lang/cxx/stl_iterator.h: In function `{error} > iterator_category(const int &)': > e:/djgpp/lang/cxx/stl_iterator.h:126: confused by earlier errors, > bailing out > > Could you guys tell me what I've been missing here ? -- Martin Ambuhl (mambuhl AT earthlink DOT net) Note: mambuhl AT tiac DOT net will soon be inactive