Write a program named hw3pr3.cpp which asks the user for the
URL of a PDF file, checks that the URL starts with "http://"
and ends with
"pdf" or "PDF", downloads it with wget, and displays it with display. To learn how these programs work, put these statements in a main to test them:
" -O webfile.pdf");
Running this should download that PDF file and open an X window to display it. Now write the real hw3pr3.cpp. Note: check the "Enable X forwarding" box in your Putty configuration, and start Xming before you run your program. (On a Mac you do not need Xming, you need XQuartz; Terminal will automatically launch XQuartz when it receives X11 graphics.)
Hints: To see if a string s starts with "abc" you could use
if(s == 'a' && s == 'b' && s == 'c'). The system command expects a C-style string, so use system(s.c_str()) if s is a C++ string.