I am reading between the lines, so I may not properly understand, but this is 
my take on things:

You are supposed to write a function to roll TWO dice and return the TWO random 
values.
The first  function should return the two values using references.
The second function should return the two values using pointers.

There are other ways to get the two values back to the caller but your teacher 
wants it done this way to help you with your understanding of pointers versus 
references.



[email protected] wrote:
> I appreciate all of the replies and directions. I am taking a
> self-study class from the Game Institute.... (I'm hiding under my
> desk, please don't throw anything!) The instructor has written the
> book and seems simple enough to understand. We have covered, let me
> rephrase, I have covered: Namespaces, Include Directives a brief
> description of the std library, local and global variables. Functions
> in the basic sense of the word. Arithmetic Operations Loops, (for, if,
> if else, while....etc.) 
> 
> The chapter that I am working on is called references and pointers. I
> am pretty sure that I understand the concept of pointers and
> references, but when asked to create a dice rolling function once
> using references and a second time using pointers... I don't
> understand the need for this. This program can be written (I believe)
> very simply using a function, a random number and returning the
> appropriate array position for both die. 
> 
> I am probably not making any sense. But it sounds perfect to me in my
> brain! :)
> 
> Any thoughts would be welcome. Please remember that I am new to this
> and don't understand a lot of code! 
> 
> Thanks again!
> Stephanie
> 

Reply via email to