Download Files

This is a discussion on Download Files within the C++ Programming forums, part of the General Programming Boards category; Hello, How i can make a program that the user can download files, like wget that the user type this: ...

  1. #1
    Trying to Learn C nathanpc's Avatar
    Join Date
    Jul 2009
    Location
    Brazil
    Posts
    72

    Question Download Files

    Hello,
    How i can make a program that the user can download files, like wget that the user type this: wget http://www.testpage.com/file.pdf and the program download the file, i want this syntax, my program name and the site, then the user press enter and my program start the file download, please if you are going to post the code, please post the full code, because i'm starting in C++ development.

    Thanks,
    Nathan Paulino Campos

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    Here is the complete code to do exactly what you are asking for.

  3. #3
    Trying to Learn C nathanpc's Avatar
    Join Date
    Jul 2009
    Location
    Brazil
    Posts
    72

    Lightbulb

    Hello bithub,
    Thanks because of the wget source code, but what i want is only the code of a very simple download program, because i'm starting in the C++ development, than i want to learn, and while i get better in C++, i improve the aplication, you understand.

    Thanks,
    Nathan Paulino Campos

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,636
    >> but what i want is only the code of a very simple download program

    So you want someone to sit down and write you a sample file downloader? Give me a break. If you want to do it "by hand" look into sockets and the http spec. Otherwise, use an existing library/utility.
    Code:
    if( numeric_limits< byte >::digits != bits_per_byte )
        error( "program requires bits_per_byte-bit bytes" );
    24bbs.cpp

  5. #5
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,230
    Quote Originally Posted by nathanpc View Post
    Hello bithub,
    Thanks because of the wget source code, but what i want is only the code of a very simple download program, because i'm starting in the C++ development, than i want to learn, and while i get better in C++, i improve the aplication, you understand.

    Thanks,
    Nathan Paulino Campos
    wget is not exactly a complex application. If you want a "very simple download program" then wget is exactly what you want.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  6. #6
    Trying to Learn C nathanpc's Avatar
    Join Date
    Jul 2009
    Location
    Brazil
    Posts
    72
    Hello Sebastiani,
    Sorry, but i'm trying to learn C, i'm a VB developer and a litle bit in Java, but C is what i want to play with.
    Follow Me At Twitter
    Eee PC 904HD White | Windows XP Home Edition and Linux Ubuntu Hardy Herron

    Google Talk: eeepc904@gmail.com
    ICQ: 424738586
    AIM: nathanjava

  7. #7
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Quote Originally Posted by nathanpc View Post
    Hello Sebastiani,
    Sorry, but i'm trying to learn C, i'm a VB developer and a litle bit in Java, but C is what i want to play with.
    Except apparently you don't want to play with it, so much as have somebody else play with it and hand you the result?

  8. #8
    Registered User
    Join Date
    Apr 2007
    Posts
    137
    On Windows, just use Shell api (1 line of code) or COM or Net (10 lines)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Create Copies of Files
    By Kanshu in forum C++ Programming
    Replies: 13
    Last Post: 05-09-2009, 07:53 AM
  2. Reading .dat files from a folder in current directory...
    By porsche911nfs in forum C++ Programming
    Replies: 7
    Last Post: 04-04-2009, 09:52 PM
  3. Error opening files in a different dir
    By Ozzie in forum C++ Programming
    Replies: 3
    Last Post: 10-09-2008, 06:55 AM
  4. Working with muliple source files
    By Swarvy in forum C++ Programming
    Replies: 1
    Last Post: 10-02-2008, 08:36 AM
  5. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21