generate rand() in text box

This is a discussion on generate rand() in text box within the C++ Programming forums, part of the General Programming Boards category; Hi ,
Trying to generate 6 digit random number and display in text box as RN: XXXXXX where X is ...

"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell

"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell

"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell

"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell

>Though I still think that generating 2 numbers would be a good idea.
True, I believe that's the best way of doing it. And I missed the bug in the random number generation formula. I knew something didn't look quite right. But I was focusing on questions 1. and 2. in the original post.