That's not cheating; that's easy mode. You should be testing with various kinds of test input: blank lines, lines in which there is no comma, or only one comma, or a dozen commas, etc.Originally Posted by underpressure
Maybe the blank lines are at the end. Since you only seemed to have tried my advice on the code rather than my advice on debugging, who knows? I wanted you to say "blank lines are happening alternating between non-blank lines" or "blank lines are at the end", but it you don't debug, you cannot say. Even if you don't use a debugger, it could have been as simple as just commenting out the sorting part so you see the original input.Originally Posted by underpressure
The issue you observed can happen when you have a text file with a Windows new line sequence and try parsing it on other systems without taking the new line sequence into account. However, since you are both compiling and running on Windows, this should be a non-issue.Originally Posted by underpressure