File path under windows & console

I’ve developted 2 similar programs. one under windows app and one under console app. with console app i can access file inside a folder by passing a path like “data/terrain.raw” but in windows application this couldn’t be done. so i endup passing something like “c:/opengl projects/terrain/data/terrain.raw” to access the file. Obviously this windows app will only work on my computer since that file path only exist in my computer. So how can i accsess this file without passing the root directory?

and the OpenGL question was?

Look up GetCurrentDirectory in the MSDN. Alternatively, you may ask on a general windows programming forum.

thanks for the reply. Sorry i failed to realize this is opengl under windows forum.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.