0
IS THERE A WAY TO DISPLAY A WEBSITE IN C++? OR OPEN IT IN WEB BROWSER THROUGH C++ CODE OR SIMPLE VISIT A WEBSITE THROUGH C++?
2 ответов
+ 7
There is an easy way now with latest browser technology that work together with Javascript using Web Assembly.
Create C++ file and use Emscripten to compile and generate an HTML page to run the C++ code in.
An easy to follow tutorial here
https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm
+ 1
You can start a web browser and load a specific URL from the terminal, and you can execute terminal commands in C and C++.
Here is the code you need to execute:
string url = "http://www.sololearn.com";
system((string("start \"\" \"")+url+string("\"")).c_str());
/* The terminal command is :
start "" "http://www.sololearn.com"
This will open the link in your default browser.*/