V
Vijay
Hi All,
I have written below code to read and write a file (Big file).
But every time, one extra character(may be NULL char) has been written
in output file.
Can any one please tell me why it is happing and how we can solve
this?
CString temp;
ifstream in(str_FilePath,ios::binary);
FILE *fp;
fp = fopen("C:\\pp11.txt","wb");
while (! in.eof() )
{
getline(in,str_Line);
str_Line+= "\n";
temp=str_Line.c_str();
/*Doing some operation*/
fputs( temp.GetBuffer(temp.GetLength()), fp );
temp.ReleaseBuffer();
}
Thanks in advance.
Regards,
Vijay
I have written below code to read and write a file (Big file).
But every time, one extra character(may be NULL char) has been written
in output file.
Can any one please tell me why it is happing and how we can solve
this?
CString temp;
ifstream in(str_FilePath,ios::binary);
FILE *fp;
fp = fopen("C:\\pp11.txt","wb");
while (! in.eof() )
{
getline(in,str_Line);
str_Line+= "\n";
temp=str_Line.c_str();
/*Doing some operation*/
fputs( temp.GetBuffer(temp.GetLength()), fp );
temp.ReleaseBuffer();
}
Thanks in advance.
Regards,
Vijay