hi,
i wrote a program that it read a file from the harddisk. but it seem not to be able to load the file. i checked the file name and copy the input file to the debug folder and to the the folder where my source file is, but it still return null. i checked the project property->debug->working directory, and it indicated that it was the macro $(ProjectDir). it should be ok right? if i can not get this right, there would be very bad to the other projects that i want to do. is there a way i can check the content of $(ProjectDir) to see what it is? does anyone has any idea what should i check for?
i added part of your code into my program. it confirmed that my directory and file name are correctly set, but my program still returned NULL. what i actually trying to do is to read in a TGA file and use it as a texture for my opengl program. i do not understand what do you mean by "read it from a config file"? i tried the full path in my program, it had wiggly underline under the directory. i don't understand what is the problem. i simply copy the output from your code and added it to the beginning of my TGA file name. the wiggly line usually mean the variable is not defined. the path is
"C:\Users\rob\Dev C++ source\MSVC++\freeglut\sin func with texture\Men.tga", with the wiggly underline under Users only. when i deleted the Users, the underline went away.