Beginner needs help w/ran. nums. in arrays - URGENT!

This is a discussion on Beginner needs help w/ran. nums. in arrays - URGENT! within the C++ Programming forums, part of the General Programming Boards category; I need to create a program that generates 50 sets of lotto picks each set consisting of 6 numbers between ...

Beginner needs help w/ran. nums. in arrays - URGENT!

I need to create a program that generates 50 sets of lotto picks each set consisting of 6 numbers between 1 - 54. each set must contain 6 unique numbers. The set themselves do not need to be unique from each other. That is the question - the problem is that when I run the program all I get is what looks like a memory adddress ( 006AF948).
Any help would be greatly appreciated as my instructor didn't get back to me with this assignment till Monday and it is due Wed. The program is as follows. If I am understanding 2D arrays (probably not ;( ) would what I have not put a random number in each element? Thanks for any and all help.

You have 2 basic problems, firstly, the problem that gliptic is talking about. You are not writing out the contents of the array. You will need to write out each element. Heres a clue...

cout << lottoNums[0][0];

... but use loops.

When you have fixed that, (and possibly added some formatting), you will find that all the elements have the same value, that is because you are calling the random number function once only. You need to call it for each new random number.