Here's a simple code that's giving me a headache. It reads from a text file that has 3 lines in it. I have a hunch that it may be an IDE bug, but here it goes.
I have a hunch that it may be an IDE bug, but here it goes.
Nope.
Line 12 you declare 'line' as a pointer to char * and leave it uninitialzed. It's supposed to crash on line 15 but uninitialzed pointer tend to cause unexpected behavior.