Number genereation

For my assignment I need to generate numbers using 1,2,3,4,5 only and arrange in combinations of 4. For example:
1453, 2351, etc till we can have no such combinations again. No repeatitions are allowed. Also how will I output this to a .txt file with a possiblity of choosing to print it to a listbox.
Please, please help. I have a Borland C++5 as compiler and new to the whole game but not advanced yet.
Thanks for your help in advance.
do you have any work so far?
Have you learned about sets yet (to save which values you already have)?
http://www.cplusplus.com/reference/set/

How about rand (to generate random numbers) ?
http://www.cplusplus.com/reference/cstdlib/rand/
Topic archived. No new replies allowed.