MarciXs
Sorceror
Weird problem
What could be the reason that If I have many ifstreams,ofstreams,fstreams. . After a while , It gets buggy , for example. I have for(int x= 0;x<100;x++){ instream.open("readme.txt",ios::in);
while(! in.eof()){
in.getline(somedata,1024);
cout << somedata << endl;
}
--- problem usually is that the ifstream in this case instream can't do it more than once, what i mean is. It just does it one time and the rest of the loop it just prints out empty line. Does anyone knows why could this happen?
what I wanted to know is , why could instream/outstream start to get buggy?
I have many pointers which haven't been initialized, could be that the problem?
I have :
class myclass
{
char * one;
char * two;
char * pch;
struct data[]
{
char rl[1024];
etc etc.
}datas[10];
ifstream ones;
fstream yuu;
ofstream etc;
int al;
char * bb;
char * cc;
void darit(char * a,char * b , int c,int j,char * l);
.....etc etc
Thank you.
What could be the reason that If I have many ifstreams,ofstreams,fstreams. . After a while , It gets buggy , for example. I have for(int x= 0;x<100;x++){ instream.open("readme.txt",ios::in);
while(! in.eof()){
in.getline(somedata,1024);
cout << somedata << endl;
}
--- problem usually is that the ifstream in this case instream can't do it more than once, what i mean is. It just does it one time and the rest of the loop it just prints out empty line. Does anyone knows why could this happen?
what I wanted to know is , why could instream/outstream start to get buggy?
I have many pointers which haven't been initialized, could be that the problem?
I have :
class myclass
{
char * one;
char * two;
char * pch;
struct data[]
{
char rl[1024];
etc etc.
}datas[10];
ifstream ones;
fstream yuu;
ofstream etc;
int al;
char * bb;
char * cc;
void darit(char * a,char * b , int c,int j,char * l);
.....etc etc
Thank you.