public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* STL vector resize/push_back crash
@ 2002-07-30  8:03 Bob Lapique
  0 siblings, 0 replies; only message in thread
From: Bob Lapique @ 2002-07-30  8:03 UTC (permalink / raw)
  To: gcc-help

Hi,

I declared a class called PgColumn and a vector <PgColumn>.

This class has a default constructor, a copy constructor, an overloaded
= operator, a destructor, an overloaded operators == and !=.

The class also has as a property : vector <string> data;

It does not allocate memory nor create new objects.



The problem :
=============
The program crashes randomly when I perform a resize or push_back on
vector :
vector <PgColumn> columns.

e.g. the following code...
   columns.resize(4);
   cout<<colums.size()<<endl;
would display 4205488815 instead of 4 !!!! Why ???
Then,
   columns[0]=tmpCol;
crashes.



It's been giving headaches for 2 long days. Thanks for any help.


 
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-07-30 15:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-30  8:03 STL vector resize/push_back crash Bob Lapique

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).