Ok, this probably has a really simple answer, but I\'ve never tried to do it before: How do you launch a web page from within an app? You know, \"click here to go to our FAQ\",
For the record (since you asked for a cross-platform option), the following works well in Linux:
#include
#include
void launch(const std::string &url)
{
std::string browser = getenv("BROWSER");
if(browser == "") return;
char *args[3];
args[0] = (char*)browser.c_str();
args[1] = (char*)url.c_str();
args[2] = 0;
pid_t pid = fork();
if(!pid)
execvp(browser.c_str(), args);
}
Use as:
launch("http://example.com");