I am working on a Qt5 project written in C++. Building the project gives an error:
C2440: '=': cannot convert from 'const char [9]' to 'char*'
Which points to the line of code below:
port_name= "\\\\.\\COM4";//COM4-macine, COM4-11 Office
SerialPort arduino(port_name);
if (arduino.isConnected())
qDebug()<< "ardunio connection established" << endl;
else
qDebug()<< "ERROR in ardunio connection, check port name";
//the following codes are omitted ....
What is the problem here, and how can I correct it?