Hello all,
I have this class with an instance method named open and need to call a function declared in C also called open. Follows a sample:
void SerialPort::open()
{
if(_open)
return;
fd = open (_portName.c_str(), O_RDWR | O_NOCTTY );
_open = true;
}
When I try to compile it (using GCC) I get the following error:
error: no matching function for call to 'SerialPort::open(const char*, int)'
I included all the required C headers. When I change the name of the method for example open2 I don't have not problems compiling.
How can I solve this problem. Thanks in advance.