Serial port programming C++