Download http picture using C++

Dear all,
I am working on writing the script which can read a file (having the html path for some pictures) and download those picture in the given local directory. Please find my iniatitve here, however I am still not able to figure out the 'download' command.
Any help is appreciated.

thanks,
emily

#include <iostream>
#include <sstream>
#include <string>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>

using namespace std;

void help() {
  cout << " You must provide one input parameters: " << endl;
  cout << "   1) Name of File containing donlwoad path" << endl;
  exit(0);
}


main(int argc, char *argv[]) {
  if (argc < 2) help();
  string InFile   = argv[1];
  ifstream FileToRead(InFile.c_str());

  // debug step                                                                                                                                                                                                 
  if(!FileToRead.is_open()) {
    cout << "Problem opening the file. Program terminating." << endl;
    exit(EXIT_FAILURE);
  }

  std::string line;
  //  while(!FileToRead.eof()) {                                                                                                                                                                                
  while(std::getline(FileToRead, line))
    {
      FileToRead >> line;
     wget line;                                                                                                                                                                                              
    }
}
system("wget 'http://url'");

You can feed it a string like system(str.c_str());