While that's a valid statement, I doubt it does what you want it to. Put it in a cout.
Code:
srand(time(&t)); /* seed the random number generator */
Since you're not using the variable t anywhere, just pass time() NULL and it won't use a variable.
Code:
nums[i] = rand()%6 + 1;
cout << nums[i] << endl;
switch(nums[i])
{
case 1: ++count[0]; break;
case 2: ++count[1]; break;
case 3: ++count[2]; break;
case 4: ++count[3]; break;
case 5: ++count[4]; break;
case 6: ++count[5]; break;
default: cout << "An error has occured!"; break;
}
Why not this?
Code:
nums[i] = rand()%6;
cout << nums[i] + 1 << endl;
++count[nums[i]];
Looks like it's a work in progress . . .