+ 9

How can i access website text's (data)/ .txt file in C++

if I upload any .txt file online. I want to get access of text on .txt and show on output on sololearn đŸ˜« playground

4th Aug 2018, 7:59 AM
Charan Leo25
Charan Leo25 - avatar
9 Answers
+ 3
Charan LEo25 Gaining access to a web file from C++ on Code playground is impossible, as there is no built in way to do this. As for the task on the PC, you are bound to use external libraries that can interface with the HTTP protocol. Or you can use system() (cmd) calls to download the file to your PC, perform normal I/O using fstream and delete it when the work is done. Read more here : www.cplusplus.com/forum/beginner/56883 www.wincodebits.in/2016/03/how-to-download-a-file-using-command-prompt-cmd.html
7th Aug 2018, 1:36 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 10
code playground if not then pc Kinshuk Vasisht
6th Aug 2018, 5:00 AM
Charan Leo25
Charan Leo25 - avatar
+ 9
Ace 😱
4th Aug 2018, 8:00 AM
Charan Leo25
Charan Leo25 - avatar
5th Aug 2018, 10:26 AM
Charan Leo25
Charan Leo25 - avatar
+ 7
what about python and some java Toni Isotalo
5th Aug 2018, 2:59 AM
Charan Leo25
Charan Leo25 - avatar
+ 5
still waiting for aceđŸ˜¶
4th Aug 2018, 4:24 PM
Charan Leo25
Charan Leo25 - avatar
+ 2
You want to gain access to a file uploaded on SoloLearn or somewhere else? And where do you wish to run the code to access it? In the code playground itself or on a PC?
6th Aug 2018, 1:29 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
0
Sup man
4th Aug 2018, 12:20 PM
Moose Dynasty
Moose Dynasty - avatar
0
You can't do that in playground. Http requests are allowed only in web playground.
4th Aug 2018, 6:57 PM
Toni Isotalo
Toni Isotalo - avatar