| Conny14156 (10) | |||
|
Hi I was wondering how to reach a class after I declared it as a example. So if I ware to do it like SimpleCube Cube; how would I reach Position? via my "Cube" and not via SimpleCube. Like Cube.Position.X and NOT SimpleCube.Position.X
| |||
|
|
|||
| iHutch105 (947) | |||
Would be much easier to declare Position and Vertex structures separately and give an instance of each to your cube.
There's some privacy issues here and there with that example but hopefully you'll catch my drift. | |||
|
Last edited on
|
|||
| ajh32 (85) | |||
You would need to declare a member variable of type Position in your SimpleCube class:
| |||
|
|
|||
| vlad from moscow (3112) | |
| Your class SimpleCube has no a data member of type Position. It has only the definition of type Position. If you want to have a data member of type Position you should declare it in the class. | |
|
|
|
| Conny14156 (10) | |
| Ah thanks guys, didnt know you had to do it that way >.< | |
|
|
|