I am trying to create a cpp file that will enable user to download the content from a web URL & stored it to a desired html file.

I am running on Linux. The program will call GNU wget CLI program to grab the content & stored it to a desired html file.

I would be using some unix command in the c++ program:
$wget -q -E -O index.html http://www.website.com | programfilename

I never done this before & I wonder how to declare the unix command in c++ program?
Any guidance how to get the ball rolling? Tks!

The "system" function in "cstdlib" should work:

#include <cstdlib>

int main()
    system("wget -q -E -O index.html http://www.website.com | programfilename");
    return 0;