Solved

C++ sys.h and net.h header files.

Posted on 2004-09-12
9
381 Views
Last Modified: 2012-06-27
Dear Expert,

I want to develop applications which depend on networking. I have got books in which sample networking applications uses net.h and sys.h C++ header files. In my C++ these files are not there. So, I am unable to compile those programs and learn network programming.

Kindly help me in getting these header files. If download of them is available on net then please give the URL.

Thank You.

VM.
0
Comment
Question by:vikrant10
  • 4
  • 3
9 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 12041435
Hi vikrant10,

which platform and compiler are you using ?

Sunnycoder
0
 

Author Comment

by:vikrant10
ID: 12041468
Dear sunnycodeer,

I am using windows platform. Compiler is Turbo C++(don't remember actual version).

VM.
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 12041476
Turbo C++ is for DOS ... Network programming in DOS may not be pretty ...

I suggest that you get a newer compiler ... cygwin + windows port of gcc is one good option ... another will be something like devshed C++ or VC++
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:vikrant10
ID: 12041499
Dear sunnycoder,

I have got Visual Studio 6. Visual C++ is installed with it. But it doesn't have those header files. Can u give me the URL of any download site.

Help me.


VM.
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 12041504
vikrant10,

For VC++, you need to include winsock.h file
check these links
http://tangentsoft.net/wskfaq/
http://www.hal-pc.org/~johnnie2/winsock.html

Sunnycoder
0
 

Author Comment

by:vikrant10
ID: 12109941
Dear sunnycoder,

As u have suggested, I have included winsock.h file in my C coding in Visual C++. The program has not compiled with zero errors. But on building it is displaying linking errors. For eg. on lines containing gethostbyname, shutdown etc. What might be problem ?

Please help.

VM.
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 125 total points
ID: 12110010
make sure that winsock.dll is in the linker's path
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
string initialization in java 11 115
bigHeights  challenge 13 64
mapAB Challlenge 35 156
groovy example issue 10 103
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question