[odb-users] help
Boris Kolpackov
boris at codesynthesis.com
Mon May 14 13:18:53 EDT 2012
Hi Khaldon,
khaldon hmesheh <khaldon_hmesheh at yahoo.com> writes:
> shared_ptr<ship> p (db->load<ship> (karam1_id));
> cout<<" general charac: "<<p->generalCharacteristic_->lpp_<<endl;
>
> I got the following error messages:
>
> error C2248: 'ship::generalCharacteristic_' : cannot access private member
> declared in class 'ship'
>
> error C2248: 'generalCharacteristic::lpp_' : cannot access private member
> declared in class 'generalCharacteristic'
This doesn't really have anything to do with ODB: in your code you try
to access data members that are private. Perhaps you should use (public)
accessors instead:
p->generalCharacteristic ()->lpp ()
Boris
More information about the odb-users
mailing list