Ok well I have 4 char arrays. Each array has predefined words in them. For example:
char *article[MAX_ARTICLES] =
{ "the", "a", "one", "some", "every", "any" };
I'm trying to make random sentences as defined by the user. So if they type in the value 567 or whatever it may be I use it as the seed for srand. I'm trying to print whats in the value of the array. So if the word "every" was print it would need would need some seed value mod 6. I tried this
cout << article[srand(seed_val) % MAX_ARTICLES];
Just to test if I was accessing a random element but it was to no avail because its invalid syntax. Is there another way I can do this? I'm sure I can make variables and assign the new random value every time but I want to make this efficient. Any ideas?