Forum: C++ Jun 27th, 2005 |
| Replies: 6 Views: 1,977 Put your loop back in. If it still an infinite loop, I will look at it for you.
Bruce |
Forum: C++ Jun 27th, 2005 |
| Replies: 10 Views: 5,806 Marcia,
I now have all the compile errors out except a small section of code. That section may be a design error anyway. But, I won't know until I see your entire code.
When is your... |
Forum: C++ Jun 27th, 2005 |
| Replies: 10 Views: 5,806 Marcia,
Please send your entire code to me at << moderator edit: removed email address >>. Including your main program.
Take care,
Bruce |
Forum: C Jun 27th, 2005 |
| Replies: 9 Views: 3,138 dile,
Please include the entire file. For example, I don't see any include files.
Take care,
Bruce |
Forum: C++ Jun 27th, 2005 |
| Replies: 10 Views: 5,806 Marcia,
Here is a start.
#ifndef GAMEPIECE_H
#define GAMEPIECE_H
#include <iostream>
#include <fstream> |
Forum: C Jun 26th, 2005 |
| Replies: 9 Views: 3,138 I would do it as a 2D array. |
Forum: C Jun 26th, 2005 |
| Replies: 9 Views: 3,138 You already know how to check parts 1 and 2. You are searching the row and column.
Part 3 is just a hybred of the two. The check for the second row of the 3X3 region is just a smaller subset of... |
Forum: C++ Jun 26th, 2005 |
| Replies: 10 Views: 5,806 M,
Use [code] place code here [\code]
But, instead of a \code use /code
Bruce |
Forum: C Jun 26th, 2005 |
| Replies: 8 Views: 2,487 dello,
I have your code running on my computer. Take a look at how you are calculating the average. Is that what you really want?
Take care,
Bruce |
Forum: C Jun 26th, 2005 |
| Replies: 8 Views: 2,487 Just a note...
Is this line correct?
for (int j=0; j<maxrows; j++)
Should it be maxcols instead?
Take care,
Bruce |
Forum: C++ Jun 25th, 2005 |
| Replies: 10 Views: 5,806 M Tritt,
Are you currently studying operator overloading in class? I would guess yes.
You overload operator!= and operator==. You will use those two operators to compare two instances of the... |
Forum: C++ Jun 25th, 2005 |
| Replies: 3 Views: 25,837 You aren't using the std dev formula correctly.
See http://davidmlane.com/hyperstat/A16252.html
Also, here is an update to your code. Notice all the variables are declared at the top of main. ... |
Forum: C++ Jun 25th, 2005 |
| Replies: 6 Views: 1,977 Where is your loop?
What is that variable that you are streaming out?
You also have an error in one of your calculations.
I have modified your program and it seems to work now once you... |
Forum: C++ Jun 25th, 2005 |
| Replies: 5 Views: 5,226 You aren't even using the variable "prev".
Do you really need the "start" variable?
Bruce |
Forum: C++ Jun 25th, 2005 |
| Replies: 5 Views: 5,226 Yaan,
There is another bug in your code.
Each time you start inserting records you are setting start.next = NULL. This destroys your pointer to any previously entered data.
Try inserting... |
Forum: C++ Jun 25th, 2005 |
| Replies: 5 Views: 5,226 Yaan,
Eliminating the calls to main is correct.
Your logic must be updated to allow your main menu to be shown until exit.
I have provided an update to your code below.
The update also... |
Forum: C++ Jun 25th, 2005 |
| Replies: 5 Views: 5,226 yaan,
Inside your function definitions, you need to replace "main()" with "return".
You are calling the main function instead of actually returning to it.
You should also add some white... |
Forum: C++ Jun 25th, 2005 |
| Replies: 20 Views: 6,560 JoBe,
I would suggest STL <vector>.
Take care,
Bruce |
Forum: C++ Jun 25th, 2005 |
| Replies: 2 Views: 1,150 Shahid,
Search for the word "Change" in the following code to see my changes. Also, I added a mock definition for the input function.
Take care,
Bruce |