fopen doesn’t create file in the current directory
Posted
by
indira
on Stack Overflow
See other posts from Stack Overflow
or by indira
Published on 2012-03-29T05:16:33Z
Indexed on
2012/03/29
5:29 UTC
Read the original article
Hit count: 159
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?
© Stack Overflow or respective owner