Static members and pointers to const


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by Juan Romero Jr. on April 20, 2001 at 12:20:10:

In class today the idea of using a static pointer for creating bi-directional association between creatures and ecosystem was brought up as something decent to consider. I am wondering if this static pointer can point to a const? For example- ecosystem class contains 2 lists - one of plants and creatures. For creatures to be able to query the ecosystem of another creature with the same location, a link between the creature and the ecosystem needs to be established. Is there a way for the target of that pointer (from creature to ecosystem) to be const so that the creature object cannot alter the data (or call functions to alter the data) of the ecosystem class? I hope this is clear enough for someone to anwser.

Thanks


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]