CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2015
    Posts
    1

    need help with program for class

    Form1.cs On line 33 and line 48 it keeps saying that the index is outside of the bounds for array. How do I fix this?

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: need help with program for class

    How about use code tags and post the code directly? That way, folks that are trying to help won't have to open an attachment.

  3. #3
    Join Date
    Oct 2015
    Posts
    26

    Re: need help with program for class

    An array starts at 0 index.

    So it looks like
    Code:
     double highest = iArray[filename.Length];
    should be

    Code:
     double highest = iArray[filename.Length - 1];
    It is the same issue with lowest. on line 48
    Last edited by pebmeister; December 10th, 2015 at 11:09 AM. Reason: missed slash on close CODE tag

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