myfile.seekg(0,ios::beg);
while(!(myfile.eof()))
{
myfile.get(b);
MSIZE++;
}
myfile.setstate(ios::goodbit);
myfile.seekg(0);
int mt = myfile.tellg(); // i look at this to see what position in the file it's at, it stays at eof
if(output==NULL)
{
output=newchar[MSIZE+1]; //MSIZE
}
while(!(myfile.eof()))
{
myfile.get(b);
// //MSIZE++;
output[a]=b;
a++;
}
when i loop till not eof the second time it hasn't changed the position from .eof , any reasons for this?
also my char array isn't initialized to 0 either . . .