YO gUYS Please help me how to open a webpage in C++

Recommended Answers

All 9 Replies

cURL is the library which is used to do HTTP/FTP and similar protocols.
There is a decent binding cURLpp for C++ which would be best for what you want.

PS: C++ language as such do not have such functionality.

IMO C and C++ are poor languages for doing web stuff. It will be a lot simpler to use a language that is suited for that kind of programming.

I love python for this: I was parsing HTML code just after 2 weeks of learning Python,

If it's on Windows, just use Win32 api (1 line of code with Shell , or 3 with COM...)

I found this snippet a while ago.

#include <windows.h>

int main()
{
	ShellExecute(NULL, "open", "http://google.net",
			NULL, NULL, SW_SHOWNORMAL);
}

Thank u for helping me out.

very good and Very clear!

int main()
{
    ShellExecute(NULL, "open", "http://google.net",
            NULL, NULL, SW_SHOWNORMAL);
}

Works very well for me. Came across it the other day!

Yea, that was posted 4 years ago in this thread.

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.