#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    0
    Rep Power
    0

    Question 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.
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,593
    Rep Power
    4207
    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.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    "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++

IMN logo majestic logo threadwatch logo seochat tools logo