C
cviniciusm
Hello,
I'm using "g++ (GCC) 4.1.1 20070105 (Red Hat 4.1.1-51)".
I'm trying to use the open() function as defined by the header
fcntl.h, but I'm getting this error:
"
mylibrary.cpp:16: error: no matching function for call to
'mylibrary:pen(const char*, int)'
mylibrary.cpp:14: note: candidates are: int mylibrary:pen()
"
mylibrary.h:
class mylibrary
{
private:
int fd;
...
public:
int open(void);
...
};
mylibrary.cpp:
#include <fcntl.h>
#include "mylibrary.h"
int mylibrary:pen(void)
{
fd = open("", O_RDWR | O_NOCTTY | O_NONBLOCK);
...
return 0;
}
How I tell the compiler to use the open() from fcntl.h, please?
TIA,
Vinicius.
I'm using "g++ (GCC) 4.1.1 20070105 (Red Hat 4.1.1-51)".
I'm trying to use the open() function as defined by the header
fcntl.h, but I'm getting this error:
"
mylibrary.cpp:16: error: no matching function for call to
'mylibrary:pen(const char*, int)'
mylibrary.cpp:14: note: candidates are: int mylibrary:pen()
"
mylibrary.h:
class mylibrary
{
private:
int fd;
...
public:
int open(void);
...
};
mylibrary.cpp:
#include <fcntl.h>
#include "mylibrary.h"
int mylibrary:pen(void)
{
fd = open("", O_RDWR | O_NOCTTY | O_NONBLOCK);
...
return 0;
}
How I tell the compiler to use the open() from fcntl.h, please?
TIA,
Vinicius.