baxsas64 0 Newbie Poster

Hi, so I am very new to coding and I wanted to make something that opens a website stored in a string variable like this:

#include <string>
#include <iostream>
#include <windows.h>

int main()
{
string url = https://google.com;

//now I dont know how to open the url from the string
ShellExecute(NULL, "open", "https://google.com", NULL, NULL, SW_SHOWMAXIMIZED);
}

Unfortunately I dont know how to open the url from the string. I know how to open an url but not how to open one stored in a variable.
Tanks for all answers.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.