How would i create a program that randomly outputs words to make a sentance. the sentance doesnt need to make sense. I have this but the only way i can think of to do something like that is srand() but i think thats only for numbers? how would i make a random sentance generator?
Basically, it would best if you stored all of the strings in an array, as is done above. You then do a for loop, which will run 6 times, one for each word. It will generate a random number, and then access that element of the string array. if that element hasn't been used, it will print it. Otherwise, it will regenerate a random number and try to use a different string. Once all 6 are used, it exits.
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\include\c++\c++0x_warning.h|31|error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.|
||=== Build finished: 1 errors, 0 warnings ===|