(Which, incidentally, I think is a mistake. But, in any case, you need to get for EOF and it'll work fine.)
The only reason you'll ever see a segfault (barring bugs in the runtime...) is if the stack overflows. For example, if you recurse forever, without tail calls, and without a termination condition. That's what's happening here - fGetLine returns an empty string at EOF.
-
-
-
This Tweet is unavailable.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.