Click here to Skip to main content
15,895,283 members
Articles / Programming Languages / C++

Beginner C++ Random Number Generator

Rate me:
Please Sign up or sign in to vote.
4.75/5 (4 votes)
29 Jan 2013CPOL 0  
You appear to be confused about a number of things, most related to program flow and programming logic:1. You intialize a number of char variables and never change them, but then, later, you test their value. Apparently what you intended to do is compare the user input against the values you...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
28 Jan 2013Member 9790449 2 alternatives  
I am a beginner and I want to have a code with a random number generator, but my code does not follow what I would like it to follow.... PLEASE HELP! . This is what have so far... please help with any corrections, improvements, etc. #include ;#include //drand...
Please Sign up or sign in to vote.
27 Jan 2013uddhavh
You can use rand function in c++ i = rand();

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Switzerland Switzerland
Graduated at TU Darmstadt in Math & CS, with a heavy focus on CAD/CAM

Programming and designing applications in C++ in the areas AI, real-time programming, client-server applications and CAD/CAM since 1985.

Personal interests: AI, computer graphics, games, reading

Comments and Discussions