Help Please with "wget".

This is what I need to do:

Write a program which asks the user for the URL of a text file, checks to see if the URL starts with "http://", and downloads the file and prints it on the screen. Use the wget system command; for example, the statement

system("wget http://www.stroustrup.com/Programming/Graphics/Point.h"
" -O webfile.txt");

gets a text file from the web and saves it as webfile.txt in the current
directory. Your program would then open webfile.txt and print it on the
screen.

This is my code so far:

#include <iostream>
#include <string>
int system(const char *command);

int main()
{

std::string website;
std::cout<<"Enter a website that you want to grab: ";
std::cin>>website;
std::string command="wget "+website;
system((const char*)command.c_str());

}

I honestly don't know what I need to do from here. Any help would be appreciated. Thanks.
To use system() you need to #include <cstdlib> .
http://cplusplus.com/reference/clibrary/cstdlib/system/
Topic archived. No new replies allowed.