Pointer HELP!

HELP!!!

Page 1 of 1

2 Replies - 355 Views - Last Post: 21 October 2010 - 11:07 AM Rate Topic: -----

#1 infanity  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 11
  • Joined: 27-April 09

Pointer HELP!

Posted 21 October 2010 - 10:50 AM

My program: I have Plate and Post. Plate is a geometric solid, post is a geometric sold. Both are stored in the same list. Program has to print out 3 randoms.

How do i get what my pointer is pointing to, as in either plate or post? And then I have to deference or downcasting to the value before executing a the line of code to print out its attributes. I do not know how to do downcasting and online explanations doesnt help much so it might have to be deference and then if and else statement before printing out? HELP PLEASE!!!

list<geometric_solid*> solids;




FULL code can be found here: http://www.dreaminco...nked-list-help/

This post has been edited by infanity: 21 October 2010 - 10:52 AM


Is This A Good Question/Topic? -1
  • +

Replies To: Pointer HELP!

#2 newclearner  Icon User is offline

  • D.I.C Regular

Reputation: 103
  • View blog
  • Posts: 302
  • Joined: 29-September 10

Re: Pointer HELP!

Posted 21 October 2010 - 11:06 AM

why duplicate posts?
Was This Post Helpful? 0
  • +
  • -

#3 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6079
  • View blog
  • Posts: 23,550
  • Joined: 23-August 08

Re: Pointer HELP!

Posted 21 October 2010 - 11:07 AM

Topic closed. Do not open duplicate topics.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1