[maybe ot] how to initialize a class member vector type? 2

Michal Lipták liptak@isdd.sk
Thu Dec 5 04:31:00 GMT 2002


using namespace std;

this question is asked too many times in this maillist..
and it's not gcc related :(

m.

> -----Original Message-----
> From: gcc-help-owner@gcc.gnu.org 
> [mailto:gcc-help-owner@gcc.gnu.org]On Behalf Of Christian Schäfer
> Sent: Thursday, December 05, 2002 1:32 PM
> To: gcc-help@gcc.gnu.org
> Subject: Re: [maybe ot] how to initialize a class member vector type? 2
> 
> 
> sorry, for the mistake in my previous mail. the error I encountered
> was only a warning the error was/still is:
> 
> [linker error] undefined reference to 'endl(ostream &)'
> [linker error] undefined reference to 'cerr'
> 
> CS> hi all,
> 
> CS> I have a class like the following:
> 
> CS> class Bar
> CS> {
> CS>       private:
> CS>       vector<someObject> objects;
> CS>       ...
> CS> }
> 
> CS> when I try to create an instance of it within my main().
> CS> I get an error by the linker.
> 
> CS> in foo.o ... uninitialized copy<..>(..)
> 
> CS> what does that mean? and how can I initialize that vector.
> CS> maybe a constructor issue?
> 
> 
> CS> regards
> CS> /Christian                   mailto:caefer@krachstoff.net
> 
> 
> -- 
> Best regards,
>  Christian                            mailto:caefer@krachstoff.net
> 
> 



More information about the Gcc-help mailing list