Storing text file(usually made with fstream) ONLINE

In Short, i want to use fstream, but rather than the fstream accessing files from the local program folder...i want fstream to access Files present online. (even able to create or delete files online)
////////////////////////
I made a C++ program which uses text files to store data in the current folder of the program (using fstream).

I want to know of a way through which i can Connect my program to some Online server and the text files are stored there online instead of in PC.

My purpose for doing so is: Whoever downloads my program on any pc, they all will be connected to "common files" that are stored on ONLINE server or whatever.

And these files will act the same way as When we make files using FSTREAM and able to perform actions on those files.
Last edited on
fstream can only deal with files on a physical drive.
If you want to upload or download files you need an FTP library.
Once you have downloaded the file you can open it with fstream, make your changes and upload it.
that depends a little.

if the server can be mapped via samba or whatever to look like a local drive, normal file functions will work. This is more for a small network, like a company LAN/WAN file server, or personal & buddy setup?

there is also scp type interface.
you can also transmit via udp or tcp type client/server software. This may be a little easier to harden against hackery.

only the direct mounted approach is going to allow fstream, though. Anything else is as stated, copy locally and resubmit after approach.
Last edited on
thanks for the replies :)
I agree with above, my thoughts are you simply need something to control write permissions.
No program out there is going to let you change or delete a file online unless you are the owner or you can control the permissions.

Seems to me the best way to allow this to happen is put a unix server "host" online and write your program to login to the host and run the parse/sort/fstream program your talking about.
Then you just need a client and host and all the data is online.

Topic archived. No new replies allowed.