14 msgMemory Allocation On Stack
2 msgbug around inline asm, or expected?
1 msgInstalling gcc-3.2
1 msgfield 'fucntion_name 'declared as a function
2 msgdebugging inline assembler
1 msgISO C++ forbids declaration of `result_type' wi...
1 msgunrecognizable insn error

Object of abstract type
\ benjamin (19 Jul 2007)
. \ Young, Michael (19 Jul 2007)

4 msgCrosstools and dynamic libraries
1 msgdll's?
1 msgSind Sie doof?
2 msgException handling when mixing C++ et C shared ...
2 msgGCC design document and architechture
3 msgCore dump using __cxa_demangle
2 msggcc optimization flag breakdown
4 msgFW: GCC assembler errors on all Intellistore ma...
1 msgregarding basic blocks
4 msgError referencing symbols in gdb when compiled ...
3 msgRe: gcc-help Digest 17 Jul 2007 16:12:44 -0000 ...
1 msggcc 4.0 on Mac OS X 10.3
Subject:RE: Object of abstract type
Group:Gcc-help
From:Young, Michael
Date:19 Jul 2007


This is a C++ question, not a GCC question - a better forum would be
comp.lang.c++ or something similar...

> Is it possible somehow to construct an array of objects of abstract
> type?

No. The compiler needs to have a constructible, concrete type so it
knows how much space to allocate.

> I am aware that an object of virtual class can not be allocated. But, is
> my idea solvable in a simple manner?

Yes. Create an array of ptrs. to the abstract type, and separately
initialize each entry to an object (or 0/NULL).
BTW - I recommend the use of std::vector over arrays where possible.

- Mike


© 2004-2008 readlist.com