$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Shufei Fan (fansf_at_[hidden])
Date: 2007-04-15 11:47:55
Stephan Diederich <stephan.diederich <at> googlemail.com> writes:
>
> Hi Shufei,
>
> On 4/10/07, Shufei Fan <fansf <at> hotmail.com> wrote:
> [snip]
>
> > I found out later that a member defined in my class GA was causing the
> > compiling error:
>
> This seems to work for me (currently on apple's gcc 4.01):
>
> struct GA {
> Graph *rowGraph;
> boost::property_map<Graph, int Node::*>::type nmt;
>
> GA():rowGraph(0){
> rowGraph = new Graph();
> nmt = get(&Node::count, *rowGraph);
> };
>
> ~GA(){
> if(rowGraph) delete rowGraph;
> }
> };
>
> HTH,
> Stephan
Are you saying initialize the property-pointer in the class GA's constructor?
I tried this, I am on windows vc2003.net, but that still doesnot compile. I've
switched to using local variable instead(although more local definitions, but
easier to get it work anyway)
thanks Stephan!
Shufei