Ok, I have a saved file with the following information saved in binary format.
My goal is to be able to read the file 1 char at a time,and when it reaches the '*' it puts a cout<<"\n"; in to make a new line. However, I am having trouble dealing with the primary code.
When I try to read the file, it comes out like this.
(I have it set to display 1 char at a time, then show the whole thing)
after, it displays...
*2222 (only the last char is read.
one thing to note is that to just get the basics running, the program will only read the first 5 characters.
I could use some help getting this thing to work.
char ch ='\0';
char * buffer;
char * character;
readfile.seekg (0, ios::end);
length = readfile.tellg();
readfile.seekg (0, ios::beg);
character =new char[length];
buffer[b] = new char;
cout <<buffer <<k <<endl;
cout << "Load succesful";
//cout <<character[length] <<endl;