Link to home
Start Free TrialLog in
Avatar of klopter
klopter

asked on

How do you do a forward declaration?


//  How do I make this compile?

class Link {          
public:
  const Read *neighbor ;  
};


class Read {  
private:
public:
  vector<Link> left_exts ;
}
ASKER CERTIFIED SOLUTION
Avatar of captainkirk
captainkirk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nietod
nietod

Spock to Enterprise, Captain Kirk you should answer,
As Captain Kirk answer, this should compile perfectly:

class Read;

class Link {            
public:
  const Read *neighbor ;  
};


class Read {  
private:
public:
  vector<Link> left_exts ;
};
Avatar of klopter

ASKER

Thanks,
  Ken