How can the webpage that is downloaded be stored inside a variable?

#include <iostream>
#include <cstdlib>

using namespace std;

int main(void)
{
	int VAR = system("wget http://www.google.com");

	return 0;
}

you mean this??

std::string command = "wget http://www.google.com";
system(command.c_str());

That does not store the webpage content inside a variable...

Is this what you are looking for?

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.