I am writing a program in C++ to open a web page in a browser using command line.

Suppose, I enter open www.google.com

It should open Google's home page in a browser. I want to make this program multithreaded so a user can open as many web pages as possible.

I tried google search for it, and it appears that I would need to create a batch file to do so. I am not sure how to work with batch files, so I do not think it is a probable solution.


I would probably recommend the use of the curl library as way for your program to interface with the internet.

As far as multithreading goes.. it may be possible to open web pages on demand from the user as the user initiates the action; therefore, I would explore the possibility of event-driven launch of webpages before unnecessary multi-threading.


I actually found an easier approach to solve this problem:

system("start firefox.exe www.example.com"); // firefox.exe can be replaced with iexplorer.exe

This is accomplished without using curl library, or multithreading functions.

Thanks for the help.