public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* [maybe ot] how to initialize a class member vector type?
@ 2002-12-05  4:01 Christian Schäfer
  2002-12-05  4:28 ` [maybe ot] how to initialize a class member vector type? 2 Christian Schäfer
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Schäfer @ 2002-12-05  4:01 UTC (permalink / raw)
  To: gcc-help

hi all,

I have a class like the following:

class Bar
{
      private:
      vector<someObject> objects;
      ...
}

when I try to create an instance of it within my main().
I get an error by the linker.

in foo.o ... uninitialized copy<..>(..)

what does that mean? and how can I initialize that vector.
maybe a constructor issue?


regards
/Christian                   mailto:caefer@krachstoff.net

---


I propose that the following character sequence for joke markers:

:-)

                             19-Sep-82 11:44    Scott E  Fahlman

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [maybe ot] how to initialize a class member vector type? 2
  2002-12-05  4:01 [maybe ot] how to initialize a class member vector type? Christian Schäfer
@ 2002-12-05  4:28 ` Christian Schäfer
  2002-12-05  4:31   ` Michal Lipták
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Schäfer @ 2002-12-05  4:28 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [maybe ot] how to initialize a class member vector type? 2
  2002-12-05  4:28 ` [maybe ot] how to initialize a class member vector type? 2 Christian Schäfer
@ 2002-12-05  4:31   ` Michal Lipták
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Lipták @ 2002-12-05  4:31 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-12-05 12:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-05  4:01 [maybe ot] how to initialize a class member vector type? Christian Schäfer
2002-12-05  4:28 ` [maybe ot] how to initialize a class member vector type? 2 Christian Schäfer
2002-12-05  4:31   ` Michal Lipták

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).