Saving in game directory

Hi,
I've got small problem. I have configuration file and I want it in game directory. But when I do this:
....
config=fopen("pdm.cfg","w");
.....
The pdm.cfg appears in root directory.
I know it's stupid question, but can somebody help me?
I've got small problem. I have configuration file and I want it in game directory. But when I do this:
....
config=fopen("pdm.cfg","w");
.....
The pdm.cfg appears in root directory.
I know it's stupid question, but can somebody help me?