generate random type

Hi,

Is there any way to generate random types I build?
I know rand command returns random integers,
but I want to create some classes and and a function that will generate
randomly 3 objects of the types I have created.
Try making a template and then, make a random number from the random number generator.
///pseudocode
switch (randNumber)
case '1':
mytemplate<int> f(x) etc....

for more information about templates, see the reference section(http://www.cplusplus.com/reference/)

Note that this is not the only way to do that, but only an option. :)
Topic archived. No new replies allowed.