-
help with file again :P
hello again
thanks for helping me out in all stuffs everyone : ) but now i think i'm facing another problem with my program....
how can we actually check, if a file has nothing at all (Blank), then the program would prompt the user theres no such record.
i tried:
for(i=0;i<1000;i++)
{
if(add[i].staff_id=='\0')
cout<<"No such record(s)"<<endl;
}
looks logical right?
-
wowww thanks
uhhhh.....i'm sorry but i can't understand pointer and link lists :P
is there a much simpler code?
-
thanks again..
if( ( fd = fopen( file, "r" ) ) )
{
while( fgetc( fd ) != EOF )
++i;
}
else return 1;
( i == 0 ) ? puts( "file is void") : printf( "file is %d bytes big", i );
return 0;
}
hmmm...whats fgetc ?? and then, is "(i == 0)?" same as "if(i==0)" ??