directory navagation with a c++ program
Im wondering how to tell c to read files in a specific location and also to write data to a specific location.
for example, the following block opens "gd_2.jpg" from the dir that my program is executed in.
The program is run by a browser that points to the exe in a webserver's cgi-bin dir. How can I change the line to tell the program to look for gd_2.jpg in the htdocs folder. My dir structure looks like:
in3 = fopen("gd_2.jpg", "rb");
c:/~ etc etc ~/apache/cgi-bin
c:/~ etc etc ~/apache/htdocs
Also, how would I modify the following to output into the htdocs dir when the program is run from cgi-bin
OUT = fopen("myanim.gif", "wb");