How to send/receive on serial port is operating system dependent. The code you posted was written for MS-DOS and Dev-C++ only compiles for MS-Windows. You can not use any of the code you posted with that compiler. So you might as well just toss it away and use win32 api functions. Start by reading MSDN for CreateFile function to open the serial port, then scroll down the page until you see Communications Resources.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
I am doing it in windows Xp and I am unable to run that code.
Yes, I told you so :)Plese tell me a simple program in DEV CPP Ide where I can send and recieve the data through the serial port.
Simple? There is no such thing. Read through the information in the links I provided in my previous post. You will have to do quite a but of studying.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343