On Jan 10, 2008 10:22 AM, onecrazeemom <[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! :)

Well, the idea may be to have two integers that represent the current
roll for each die, they get passed into the function and modified by
the random number generator, and you don't need to return anything,
but after the function is finished, the values of each die roll are
simultaneously available.

Once you get into object-oriented concepts, there will be an even
simpler way of doing this.

-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
    If I were to divulge it, it would overturn the world."
               -- Jelaleddin Rumi

Reply via email to