My rand() isn't very random. As a matter of fact, it's not random at all! I am running Ubuntu 10.04 on both home comp and laptop. When I execute the code:
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int x;
x = rand();
cout << x;
return 0;
}
I get the same result every time on both computers: 180428383
Umm... Any ideas?