serialput and serialread for C++

Omegachi

Diamond Member
Mar 27, 2001
3,922
0
76
what is the syntax for sending data to a serial port and reading data from a serial port in C or C++? also, does anyone know how to use the curses library (can run 2 programs at the same time) in C?

help please, thanks!
 

singh

Golden Member
Jul 5, 2001
1,449
0
0
This is not natively supported in C/C++. Unless you're using a cross-platform library, the program will have to use platform-specific API calls to accomplish this. On *nix, I believe a serial port is treated similar to a file and you can open and write to it using the same calls as you would to read/write to a file.