Jon Berndt wrote:
Are you *using* the assignment operator for your class

Not that I know of.

FGTable::FGTable(const FGTable& t) :
  Tables = t.Tables;

I think the problem is this assignment of vector< FGTable > which involves assignment of individual FGTable instances. The default operator= does not cope with copying non-static const members. You'll either have to define:

const FGTable& FGTable::operator=( const FGTable& t )
 // defn goes here

or use vector< FGTable* > rather than vector< FGTable >, depending on
what you're wanting to do.

Minimal code that demonstrates the problem:

#include <vector>

class A
    A( void* const p )
        : _p( p )
    A(const A &a)
        : _p( a._p )
    { va =; }
    std::vector< A > va;
    void * const _p;

int main( void )
    A *pa = new A( 0 );
    A pa2 = *pa;
    return 0;



_______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] 2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to