CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Join Date
    Nov 2011
    Posts
    8

    Re: Need Help Finishing My Code!!

    Any luck yet? Ive tried multiple things getting the same result. The min & max == the same thing

  2. #17
    Join Date
    Nov 2011
    Posts
    9

    Re: Need Help Finishing My Code!!

    no luck so far

  3. #18
    Join Date
    Nov 2011
    Posts
    8

    Re: Need Help Finishing My Code!!

    Did you ever figure it out before the end of the night?

  4. #19
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: Need Help Finishing My Code!!

    So in your buildList method what is the following line supposed to do:
    Code:
    while(i<line.length() && line.charAt(i)!='i');
    First time through the outer loop when this line is executed i = 0 so the first part of the while test (i < line.length()) will be true and the second part of the while test will always be true because 'line' contains digits and not a character 'i'. This means the while loop's code block will execute, but there is no code block - the line ends with a semi-colon - so the while loop test will execute again ie you will get stuck in an infinite loop.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

Page 2 of 2 FirstFirst 12

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