Hello I'm trying to test out a random number generator to see how the distribution is and I want to write the values I get from the number generator to a file. Can someone show me in a simple code how to do that, or a good website where I can see how to do it. Thanks!
altheastronut
0
Newbie Poster
Recommended Answers
Jump to PostThis link here covers it pretty well.
Jump to Postfile<<"%d file\n",rand();
cant be dont this way, it is not printf() that you are using :)
try:file << rand() << " file\n";
All 6 Replies
jhdobbins
0
Junior Poster
altheastronut
0
Newbie Poster
zyruz
0
Junior Poster in Training
altheastronut
0
Newbie Poster
altheastronut
0
Newbie Poster
zyruz
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.