[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string???
Felix Kollmann <fkollmann@gmx.net> writes:
> try
> {
> vector <string> test;
> test[0]= "...";
> }
> catch (...)
> {
> cerr << "EXCEPTION: catched at: " << __FILE__ << ": " << __LINE__ <<
> endl;
> cerr << "EXCEPTION: error while testing" << endl;
> cerr << "EXCEPTION: programme terminated" << endl;
> return -1;
> }
>
> The library ´bstring´ throws an exception when doing ´test[0]= "..."´.
^ Whats 'bstring' a type, string is a part of the STL.
> 1. it shouldn´t throw an exception
It should or should it just segfault?!
> 2. the exception isn´t catched
Broken gcc? Older gcc had problems with exeptions and other C++
stuff. For C++ you should use egcs or >=gcc2.95(which is a remerge between
gcc and egcs).
For general C++ questions you could also use the newsgroup
news://de.comp.lang.iso-c++.
--
http://dark.x.dtu.dk/~grumbel/pingus/ |
Ingo Ruhnke <grumbel@gmx.de> http://home.pages.de/~grumbel/ |
------------------------------------------------------------------------+