We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,703 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

How to make a simple download program?

im very new to c++ and was just wondering if its possible to make a simple program where you type the name of the file and when you press enter it downloads that file from the internet to a certain place on your computer.
where would the files be stored? could you store on internet or would they have to come from my pc via internet to were i want it downloaded?
could you show some source code with explanations of it?
thankyou =)

4
Contributors
5
Replies
14 Hours
Discussion Span
8 Months Ago
Last Updated
7
Views
slasham
Newbie Poster
22 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

... and was just wondering if its possible to make a simple program where you type the name of the file and when you press enter it downloads that file from the internet to a certain place on your computer.

Of course it is.

where would the files be stored?

Where your program tells it, or better yet, where the user says.

could you store on internet or would they have to come from my pc via internet to were i want it downloaded?

Either.

could you show some source code with explanations of it?

No. But you can search the internet for information and example code.

im very new to c++

Then you aren't ready to tackle this progrm yet. You need to learn a lot more about the language before attempting to try networking.

WaltP
Posting Sage w/ dash of thyme
Team Colleague
11,404 posts since May 2006
Reputation Points: 3,421
Solved Threads: 1,055
Skill Endorsements: 36

Thank you :) I searched the Internet but when I put download into the search bar it just came up with downloads. Could you reccomend somewhere were I can get good source code and tutorials? Thanks

slasham
Newbie Poster
22 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Nope. Never cared to progam anything like that.

WaltP
Posting Sage w/ dash of thyme
Team Colleague
11,404 posts since May 2006
Reputation Points: 3,421
Solved Threads: 1,055
Skill Endorsements: 36

Use a library to do this. libcurl would be the default choice. http://curl.haxx.se/libcurl/

Sample source code: http://curl.haxx.se/libcurl/c/ftpget.html

Tutorial: http://curl.haxx.se/libcurl/c/libcurl-tutorial.html

vijayan121
Posting Virtuoso
1,740 posts since Dec 2006
Reputation Points: 1,236
Solved Threads: 320
Skill Endorsements: 11

Socket programming might help you in this. You may go through beej's tutorial on socket programming.

np complete
Posting Whiz
385 posts since Sep 2010
Reputation Points: 18
Solved Threads: 36
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0940 seconds using 2.7MB