March 15th, 2002, 01:04 AM
Help in C++ to open the URL Coonection
I am a Java Programmer. I am new to C++.
I want to open the url connection in C++.
Can anyone guide me ??
I'll be greatful if anyone helps me with an example.
March 16th, 2002, 11:21 PM
If you're using Visual C++ and the Microsoft Foundation Classes (MFC), you might want to start here for an overview of the functions and some sample code.
If you want to be really macho about it, you can do your own socket programming to open an HTTP connection, but there are lots of class libraries (both free and commercial) that have the protocols neatly encapsulated into objects.
March 19th, 2002, 12:42 PM
"maso" is what i would call it...
The language C / C++ is mainly for low-level programming, java is for mainly for high-level stuff. Eg. thus C does not implement anything but output to / from text consoles and no graphix.
you need libraries for anything or you need to start with programming your own "drivers" for everything you want to do.
java comes with 100Žs of libraries already ("classes"), like the applet.Applet class which contains your method "getUrl()"
for C / C++ this would mean: get a pre-made class that already contains your needed functions or you need a good book about tcp/ip and the http protocols. really a lot of work.
i would prefer java for this task. if you have the choice ;)
but then - if you want to learn C / C++, you will anyway need to learn a lot about pc- and os architectures, networking and drivers. i really do recommend this, it can be a lot of fun to learn this way how java was derived from C and how programs work "behind the scenes" (and all the other "fun" stuff) :)
Did you ever try assembler? this is the most hard-core stuff to do in this direction. but C is like the "connection" between assembler and java - if you know the other two, youŽll have a good time using C / C++