I'm trying to initialize a serial port using the SerialPort.h library but I just can't get it working. I want to use the SerialPort functions but when I coded it this way:
std::string port= "/dev/ttyUSB0";
SerialPort serial(const SerialPort serial);
serial.GetBaudRate();
The complier tells me "error: request for member ‘GetBaudRate’ in ‘serial’, which is of non-class type ‘SerialPort(SerialPort)’".
How do I fix this? I am totally inexperience with object oriented programming.