Move a file??? RUn a file with c++

How do I RUN a file or MOVE a file or CREATE a file to a CERTAIN location???

Like I know how to create a text or something but it saves it in the folder of Visual Studio, How do I make it save somewhere else???


Also, Is there a way to write and run a c++ program without a ide?
You'd probably need to look into a specialized library to do that with a program. STL does not have that functionality. You could try and copy the contents of a file you've opened into a new file somewhere else, but I don't know if you can delete a file with STL. However, if you create an ofstream to a nonexistent location, a file will be created for you in most cases (there may be a flag to prevent that behavior but I doubt it.). To execute a program from within another prog you'll need an API library. And those caps are kind of odd. There's really no need for emphasis on the verbs...
If you're just messing with VS you can check that stuff in the options. That's IDE settings for paths; just look around the menus or look up the VS help online.
And you can write without an IDE. But you'll still need a compiler. You make the code in a basic text editor and compile with a standalone compiler like g++. I personally don't see the advantage but I guess it's just not my thing. You never need an IDE to run a program assuming you have the library data on your comp.
Topic archived. No new replies allowed.