- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
8 Posted Topics
Check your code again. You print out the cost in both calc_discounts (line 269) and output_data (line 211). You might want to condense your code a bit, since it's very difficult to sift through. Generally, if it's difficult for us to read your code, it's difficult for you to read …
You technically don't need a days variable at all. In your getDays method, just return current hours divided by the number of hours in a day. If not, use your brain and do simple math: [CODE]setHours(double h) { hours = h; days = h / 24.0f; }[/CODE]Given the above, you …
Using GLUT, moving my mouse in the display window causes the animation to increase in speed. When running at an initial 60fps, moving the mouse causes the animation to accelerate and increase to 1000fps. My data might be wrong, but there is definitely a timing issue. I've tried implementing a …
Firstly, write your code such that it terminates [U]cleanly[/U]. You're loop ends when the program fails to read from infile, but your program will do calculations with the bad data that it tries to read. You need to rewrite your loop so that you check the state of the file …
You can't store data as both integers and characters simultaneously. If your sudoku board is a character array, use the space character (' ') and print them as such when doing output. If your sudoku board is an integer array, use 0 for blank spaces and print all others as …
Here's a good place to start: [URL="http://www.cplusplus.com/doc/tutorial/files/"]C++ File I/O[/URL] You just need to be consistent with your input data and know when to read and what you're reading. Post back if you have any questions. EDIT: All data you read from text files is stored as strings. You will need …
I'm writing an application to patch assembler instructions according to memory addresses. I have been using C/stdio for FILE operations (fopen, fseek, fprintf), but I would like to have a C++/fstream implementation as well (.open, .seekp, .put). I've had no problems patching file memory with stdio, but fstream/ofstream methods corrupt …
I'm trying to set up a couple classes, but I'm getting an error: Linker error - Undefined reference to 'Node::~Node()'. I think it might have something to do with how my headers are set up, but I'm unsure what I need to do to fix it. (FYI I added using …
The End.
xikkub