fopen doesn’t create file in the current directory
- by indira
I have created a console application in VS2010 and I want to create a file in the current directory where the exe runs. I used the following code
fp = fopen("Pkts.csv", "w+");
But file is not getting created in the current directory. But when I specifies the path as
fp = fopen("C:\\Windows\\Pkts.csv", "w+");
the file gets created in the path specified. How to create the file in the current directory?