Here's a question that I see lots of posts on. The posts that I have read tend to be mostly focused on efficiency at the expense of being quite confusing.
Let's say that I want a list 10 of integers from 1 through 10, but I want that list to be in random order. I could start like this:
int c[10];
for (int i = 1; i <= 10; i++)
c[i] = i;
That would put them in ascending order, but what if I wanted them to be in random order? Is there a relatively simple way to do this? I'm not that worried about efficiency. I'm more interested in simplicity.
Thanks very much. This is one of the posts that I looked at. Template classes confuse the crap out of me. I'd rather do this with an algorithm, if you know of one.