Skip to main content
gamedev.net
🔒 Locked

c++ help

Started by da1squad 2 replies 700+ views
Original Post
da1squad
da1squad
..... [Edited by - da1squad on April 28, 2006 9:14:58 PM]
da1squad
da1squad
Quote:
Original post by Anonymous Poster
looks like homework! Shame on you!




it is, I figured out all the code and everything, just cant get the .txt file to load properly
Doggan
Doggan
C++ is a declarative programming language. It executes one instruction at a time, in order. main() is the first function that is entered in the program. The first instruction executed is double testArray[10];. You are calling stdDev() and calculating your values before you even open the file and read in any data. It looks like you are reading the values in from the file correctly (you might want to check that you are actually ignoring the first line, as I don't see that code that's doing that).

Use the debugger and step through your program 1 instruction at a time. It will help you see how functions are entered, and the values of your variables at each instruction.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.