I need to use RNG to create a sentence, I know how to use a RNG to create numbers from 0-x but im not sure on how to use it to create sentences. Is there a way to assign random numbers to characters and store them into an array to form a sentence?

Recommended Answers

All 2 Replies

Try using the random numbers as indices into an array of words.

To random numbers, I would think maby rand() char = rand() numb;
Not sure but to assign a number to something say 5

int b

b = 5 or any other number

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.