exl@exl-Lenovo-G560e:~/Projects/genobj > cat main.cpp
#include <iostream>
#include <cstdlib>
int main()
{
srand(time(0));
std::cout << ((rand() % 2) ? "Object #1" : "Object #2") << std::endl;
return 0;
}
exl@exl-Lenovo-G560e:~/Projects/genobj > g++ main.cpp
exl@exl-Lenovo-G560e:~/Projects/genobj > for ((a=0; a < 10; a++)) do ./a.out; sleep 3; done
Object #2
Object #1
Object #2
Object #2
Object #1
Object #1
Object #1
Object #2
Object #2
Object #1