Quote:Original post by Mathmo
it is not random because numbers is the address in memory of your array. Not the values in the array. cout << numbers[0]; will give you the value of the first element in your array.
Please go and find a good tutorial and try and work through it - if you keep posting questions on here asking us to help you with everything, without starting to learn something by yourself you will never become a good programmer. Hell, even if you do go and learn something by yourself you may never be a good programmer...
I already suggested http://www.cplusplus.com/doc/tutorial/ which is a good, solid tutorial. Once you have worked through all of that tutorial, compiling, testing and fiddling with all of the code, then hopefully you will start to have an understanding of how some of c++ works, and then you will be able to start making simple games. It really is the best way to learn, and that tutorial really covers the basics you need quite well. It will probably take you a couple of weeks at least to get through it, but trust me it is the best way to get into programming.
Also, given that you are a beginner, what makes you want to learn c++? It isn't the most intuitive language for most people, although it suits me just fine. A lot of people on here would recommend c# as a better language for first time programmers. I have been coding in c++ for 8 months now, and there are still quirks of the language that catch me out almost every time I hit compile.
I wholeheartedly agree.
Throughout this entire thread you have simply been asking how to fix your code and have not tried to understand *why* it doesnt work.
You are asking us how to make your conditions work properly when you don't yourself understand why they arent working properly.
I'd strongly suggest going through the above tutorial or a similar tutorial because, until you understand how each of these constructs that your trying to use work, you'll just keep on asking us how to make your program which is what you seem to be doing.
Don't start walking until you know what your legs are there for!