What would cause fstream to read in crazy stuff? It works the first 80 or so times fails eventually, which is unacceptable.
My frames number will read in as some huge negative number and temp in all cases will be nothing so I end up with the root_path and that is it. Would using load_file.bad() be an option here? What could be causing my issue with reading a small text file?Code:ifstream load_file; load_file.open(filename.c_str()); load_file>>temp>>W_num_frames; W_ANI.assign(root_path); W_ANI.append(temp); load_file>>temp>>A_num_frames; A_ANI.assign(root_path); A_ANI.append(temp); load_file>>temp>>D_num_frames; D_ANI.assign(root_path); D_ANI.append(temp); rm->Load_Sprite(W_ANI,W_ANI); rm->Load_Sprite(A_ANI,A_ANI); rm->Load_Sprite(D_ANI,D_ANI);