here is a hard one , need to be answered
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: here is a hard one , need to be answered

  1. #1
    Member
    Join Date
    Oct 2001
    Posts
    30

    Question here is a hard one , need to be answered

    any one know how to use, only C++ program, not mfc or visual C++ program......



    Use plain C++ software to create a program which can connect to internet and do anything include the port stuff...





    please respond
    Share on Google+

  2. #2
    Senior Member
    Join Date
    Oct 2001
    Posts
    175

    Smile Hello

    Hello holysea

    Please be a little more specific on what you want to accomplish, and I will try to help.
    Simon Templer

    \"Your work is to discover your world and then with all your heart give yourself to it. \"
    -The Buddha
    Share on Google+

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Posts
    138

    libraries

    C++ as a language does not include libraries for networking. You have to use libraries (which generally come with your OS or compiler or both) that will handle the low level stuff for you. On Windows, you need WinSocks, on *nix you need BSD style sockets. I know there are BSD style libs for Windows and winsock style libs for *nix, but the way I recommended seems to be the general consensus on how to do it (I believe because of the way the OS handles networking at the kernel level) Good luck with your search. Maybe someone else will have some better information.

    Happy Hacking
    -----------------------------------------------------
    Warfare is the Way of deception.
    -Sun Tzu \"The Art of War\"
    Share on Google+

  4. #4
    Member
    Join Date
    Oct 2001
    Posts
    30

    Exclamation basically what you said is right

    ham....

    what i mean is is the c++ programming support the internet fuction or not.....


    and what i asked someone before, they all said i need to include winsock function liberary or something, the the true is...i don't know how to do it, and even if i include or add it in, i don't know the usage for, then can someone explain for me or show me the link to do it.... thank you very much
    Share on Google+

  5. #5
    Senior Member
    Join Date
    Sep 2001
    Posts
    1,027
    Internet "support" is not from the programming language, it's from the OS, that's why you have to use libraries... Unfortunatly I haven't had the chance to prog inet access on cpp yet so I can't really help you on the libraries to include and stuff..

    Ammo
    Share on Google+

  6. #6
    Senior Member
    Join Date
    Jul 2001
    Posts
    138
    In order to include a library, you need to know the name of the library. You also need to know if it uses namespaces, and what functions/variables it provides for you. Example:

    To include the standard c++ iostream library, you would type:
    #include <iostream>

    But before you use this, you need to include the functions that you want from it:

    using std::cout;
    using std::endl;

    The above example was for a library that uses namespaces. the std denotes the namespace, the :: is the scope resolution operator, and the cout/endl are the objects/functions you wish to use.

    The old style is to simply include:
    #include <iostream.h>

    This includes the entire library so you don't have to declare that you want to use specific functions. Note that the old style is considered deprecated.

    I recommend that you get a good book on c/c++ programming and a good book on the specific networking library you want to learn to use. If you are on windows, you should learn winsock library, if on *nix the bsd style sockets library. Good luck and I hope I didn't confuse you too much.

    Happy Hacking
    -----------------------------------------------------
    Warfare is the Way of deception.
    -Sun Tzu \"The Art of War\"
    Share on Google+

  7. #7
    Member
    Join Date
    Oct 2001
    Posts
    30

    Talking oh thanks

    thank you

    but do anyone know how to use winsock in the C++ program?
    Share on Google+

  8. #8
    Member
    Join Date
    Aug 2001
    Posts
    31
    holysea,

    I've been working with c++ sockets recently too (I posted my question just a few minutes ago), and the best information I've found is online tutorials. my general-purpose programming books dont cover sockets or network programming, but some more advanced books are sure to have it. I've found these tutorials online and they've been helping me a lot.


    http://www.ecst.csuchico.edu/~beej/guide/net/html/

    http://www.lowtek.com/sockets/select.html

    http://www.vbexplorer.com/reports.html

    http://www.scit.wlv.ac.uk/~jphb/comms/sockets.html

    Hope this helps...
    Share on Google+

  9. #9
    Member
    Join Date
    Sep 2001
    Posts
    31
    basically it depends in the protocols that you want to be suportered by ypu program, you can mahke a sub-program,mthat can run therfore the necesary appīs for internet, but if you want just to hold low-trafic protocols, it can be done with the basics librari....

    If you need further help, mail me....i jhope ican help yOu


    "figthing for the freedom in the "red"....."
    we work in the dark - we give what we have - we do what what we can - our doubt`s our passion - our passion our task - the rest....- is the madness of art.
    Share on Google+

  10. #10
    Banned
    Join Date
    Jul 2001
    Posts
    264

    and what i asked someone before, they all said i need to include winsock function liberary or something, the the true is...i don't know how to do it, and even if i include or add it in, i don't know the usage for, then can someone explain for me



    Winsock is a Visual Basic OCX and has nothing to do with C++. Especially since you said not MFC or MSVC++, since MS owns the copyright to winsock.
    Share on Google+

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •