Hey, I'm not too sure what the problem is here, I have never had trouble using fscanf before. The following shows the code I use to check the file, and the result.
while( true ) {
int vals_read = fscanf(fileHandle,"%[^;];%s",&name,&pass);
if( vals_read == 2 ) {
// process the line
table.Insert(pass,name);
} else if( feof( fileHandle ) )
break;
}
This is my latest attempt. I have also tried "%s%s","%s %s","%[^;]%s","%[^ ] %s". It does not read the file correctly at all. My file consists of 1 line so far:
George;TEST
While debugging, I find the pass variable is a single "T" and the name has nothing in it.
Also while debugging, if I check the status of fileHandle(my file) it has this "value" : fileHandle = 0x1035e4f8 {_ptr=0x003d7390 "George;TESTÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ...