I think I'm having a problem with file names, but I'm not too sure. I have a config file that specifies the file name of a logo and some other data. The other data seems to come out ok, but my program is unable to read the logo file. I've verified that what my file name variable contains is really what the config file contains.
In the config file I've tried it this way:
B:\\TEST.JPG
and this way:
B:\TEST.JPG
and I think even this way:
B://TEST.JPG
It fails trying to open the file. I try to open it like this:
if( (dataFile = fopen(LOGOFILENAME, "r")) == NULL ){
//fails here
return
}
If I don't use the value and just hard-code the name it works. The format I use is this:
if( (dataFile = fopen("B:\\TEST.JPG", "r")) == NULL ){
}
//continues processing
I think it has to do with the format I put into the config file for the logo name & path, but I've tried everything my brain has. Any Ideas?
Thanks!
In the config file I've tried it this way:
B:\\TEST.JPG
and this way:
B:\TEST.JPG
and I think even this way:
B://TEST.JPG
It fails trying to open the file. I try to open it like this:
if( (dataFile = fopen(LOGOFILENAME, "r")) == NULL ){
//fails here
return
}
If I don't use the value and just hard-code the name it works. The format I use is this:
if( (dataFile = fopen("B:\\TEST.JPG", "r")) == NULL ){
}
//continues processing
I think it has to do with the format I put into the config file for the logo name & path, but I've tried everything my brain has. Any Ideas?
Thanks!