CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2010
    Posts
    19

    Kinda new to this... need advice concerning a for loop

    I recently wrote a program that took a name and a line of bowling data (ie: X9/XXXXX9/XXX9) from an input file and output the marks by frame and then the scores for each frame under that. Now I've need to modify this program to take an input file that looks something like this:
    2
    Name1 (scores go here)
    Name2 (scores go here)

    I was able to do this pretty easily just by basically looping my whole program and creating a few if statements to tell it to read the 3rd line of input on the 2nd go round of the loop. Here's where I'm running into a problem... I need to calculate the total from both bowlers for every frame and I'm having trouble figuring out how to do this. It's kinda hard to explain this without you all seeing the file so I've included it in the post. It's sort of long but not too complicated. Everything is documented so it shouldn't be too hard to follow. Thanks so much for the help and if any more info is needed I'd be glad to provide it asap.
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2010
    Posts
    7

    Re: Kinda new to this... need advice concerning a for loop

    I'm not willing to download that attachment. Please post your source in [CODE] tags if you would like help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured