Link to home
Start Free TrialLog in
Avatar of marcCbrands
marcCbrands

asked on

looking for a function that will load a URL into a character array

I am looking for a C++ function that I can give an URL and that will load the html and make it stream avalaible to me. Something like this:

char* s;
s = load("http://www.cnn.com");

Marc
Avatar of Exceter
Exceter
Flag of United States of America image

>> char* s;

This is a pointer and cannot store anything.

>> s = load("http://www.cnn.com");

You can do it like this however,

char s[100];
strcpy( s, "http://www.cnn.com" );
cout << s << endl;

-- output --
http://www.cnn.com

Cheers!
Exceter

ASKER CERTIFIED SOLUTION
Avatar of DanRollins
DanRollins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial