September 22nd, 2012, 11:18 PM
Read and write the values into file
Please correct the below code:
file already contains entries : 1st row username; 2nd row password.
check status required to write at third line and need to read or alter the check status value.
Currently this code is working if already there is a value for check status, then it is overwriting else UI hanging.
FILE *l_pFile = NULL;
l_strRememberCheck = GetExePath() + _T("password");
if(NULL != (l_pFile = fopen(l_strRememberCheck, _T("r+"))) )
int count = 0;
while(count != 2)
if((c = fgetc(l_pFile)) == '\n') count++;
thanks in advance to all!
Last edited by Marc G; October 1st, 2012 at 02:55 AM.
Reason: Added code tags
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.