Jump to content
  • Advertisement
Sign in to follow this  
da1squad

c++ help

This topic is 4462 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Guest Anonymous Poster
looks like homework! Shame on you!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!