!!!!Now when I use fin.get(spacer) and then output that to a file, alls i get is spaces!!!!! I dont get it!
new source
#include <iostream>#include <stdlib.h>#include <string>#include <fstream>#include <windows.h>using namespace std;int main(){ ifstream fin; ofstream fout; char spacer; fin.open("MazeOut.txt"); fout.open("maze.txt"); if(fin.fail()) { cout << "\nError\n"; system("pause"); exit(0); } if(fout.fail()) { cout << "\nError\n"; system("pause"); exit(0); } while(fin.get(spacer)) { fout << spacer << " "; } fin.close(); fout.close(); system("pause");return 0;}
[edited by - betrayer_of_code on March 7, 2004 6:05:30 PM]
[edited by - betrayer_of_code on March 7, 2004 6:24:46 PM]