-
November 1st, 2001, 03:08 AM
#1
Member
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
-
November 1st, 2001, 03:54 AM
#2
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
-
November 1st, 2001, 04:01 AM
#3
Senior Member
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\"
-
November 1st, 2001, 05:37 AM
#4
Member
-
November 1st, 2001, 06:38 AM
#5
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
-
November 1st, 2001, 04:27 PM
#6
Senior Member
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\"
-
November 3rd, 2001, 11:27 PM
#7
Member
oh thanks
thank you
but do anyone know how to use winsock in the C++ program?
-
November 7th, 2001, 08:35 PM
#8
Member
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...
-
November 7th, 2001, 11:01 PM
#9
Member
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.
-
November 8th, 2001, 08:25 PM
#10
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|