Forum: C++ Dec 13th, 2007 |
| Replies: 5 Views: 751 Thanks I got it all figured out and running. |
Forum: C++ Dec 10th, 2007 |
| Replies: 5 Views: 751 ok, in determining all legal moves, and then assigning a random number, I run into some errors. First is there a better way to do it than a series of bool functions? |
Forum: C++ Dec 10th, 2007 |
| Replies: 5 Views: 751 Thanks, I'll get working on that, It makes sense.
Also, I will number the moves when I get everything working, as for now I just trying to get it working. I'll post my code up when I get done. |
Forum: C++ Dec 10th, 2007 |
| Replies: 5 Views: 751 I have an assignment where I'm supposed to place a knight on a chess board, and using a random number generator, make it move.
It cannot visit a space more than once.
I've tried this several... |
Forum: Troubleshooting Dead Machines Nov 18th, 2007 |
| Replies: 2 Views: 1,226 When I turn on my computer, the power light turns on, and I can hear it starting up like normal; but the monitor, keyboard, and mouse make no response. By this I mean, nothing is displayed on the... |
Forum: C++ Nov 15th, 2007 |
| Replies: 9 Views: 1,020 Hey thanks for your assistance, this community is very helpful, I think I'll stick around :) |
Forum: C++ Nov 14th, 2007 |
| Replies: 13 Views: 2,605 >"run time check #3: the variable 'noofgamesplayed' is being used without being defined"
somebody gave you the answer to that already.
In general It's a good Idea to set things equal to zero when... |
Forum: C++ Nov 13th, 2007 |
| Replies: 12 Views: 7,038 You know how to populate a two dimensional array with an iteration(for, while etc.)statement right?
Do it the same way, except set the values equal to random numbers instead. |
Forum: C++ Nov 13th, 2007 |
| Replies: 9 Views: 1,020 int b=0, counter=0, mode=1, largest=0;
for(int i=0; i<50;i++)
{
for(int j=0; j<50;j++)
{
if(arrayA[i]==arrayA[j])
{counter++;
}
}
if (counter>largest) |
Forum: C++ Nov 13th, 2007 |
| Replies: 9 Views: 1,020 Thanks for all your help, I should be able to figure it out now, but I don't have time to work on it tonight. I should have the answer by tomorrow night however! |
Forum: C++ Nov 11th, 2007 |
| Replies: 6 Views: 1,562 Sorry if my first reply confused you, I didn't really look at the code you posted, just the errors.
You initialized "noOfguesses" twice, thats what the redefinition error means.
A good way to... |
Forum: C++ Nov 11th, 2007 |
| Replies: 9 Views: 1,020 thanks duoas, heres my progress:
for(int a=0;a<50;a++)
{
for (int b=0;b<50;b++)
{
if (arrayA[a]==b)
freq[b]++;
} |
Forum: C++ Nov 11th, 2007 |
| Replies: 6 Views: 1,562 error "unreferenced local variable" Means that you initialized the variable without using it
error "uninitialized local variable 'noOfguesses' used" means that you forgot to initialize it before... |
Forum: C++ Nov 11th, 2007 |
| Replies: 9 Views: 1,020 Sorry if I wasn't clear.
I'm looking to find the mode in an array populated with random numbers.
Mode meaning the most re-occurring number (in 1,2,2,3,4; 2 would be the mode) |
Forum: C++ Nov 11th, 2007 |
| Replies: 5 Views: 5,950 int high=10;
int low=6;
rand () % (high - low + 1) + low;
hope that helps. |
Forum: C++ Nov 11th, 2007 |
| Replies: 9 Views: 1,020 I'm working on a school assignment right now,
( populate an array of 50 elements with random integers ranging from 50-100,
find mean, mode, standard deviation and the number of elements that fall... |