Need help Trying to open or run a file/program through a c++ program
Ok so Basically i have 2 questions
1. i know how to create a file with c++ using but is there a way to save it to a specific location on your computer with windows and linux if you could please Code:
ofstream myfile; im using and its not working Code:
ifstream file; |
Quote:
Code:
myfile.open("/home/xsky/newfile.txt"); Or you can chdir to change the current working directory so that files that are created will be in the new working directory, rather than the one where the executable starts. (SetCurrentDirectory in Windows) Quote:
|
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
|
All times are GMT -5. The time now is 10:14 AM. |