C++ Why does my scanf/fscanf/sscanf stop working?