Switch to full style
For C/C++ coders discussions and solutions
Post a reply

File creation in C++

Fri Nov 07, 2008 5:16 pm

I have written a program to create a file.The file always get created
in Bin folder.How to create a file in other folders of desired
location.



Re: File creation in C++

Fri Nov 07, 2008 5:18 pm

Just provide the full path to the directory you
want to open the file in.
Code:
fopen("C:\\Users\\bmccoy\\Music\\myfile.txt", "w"); in windows


fopen("/export/home/bmccoy/Music/myfile.txt", "w");


Post a reply
  Related Posts  to : File creation in C++
 table creation     -  
 Encrypt/Decrypt a file from source file to target file.     -  
 Copy file to file in java code- implementation     -  
 file descriptor vs file pointer     -  
 getting file name of html input file tag using jsp     -  
 How to convert xml file to Pdf file using C     -  
 C++ File I/O     -  
 web.xml file     -  
 JSP to Upload File     -  
 read from file in C++     -  

Topic Tags

C++ Files and I/O