I have a C++ File class with read function, that is supposed to read whole contents of a file (just like Python does) into a buffer. However, when I tried to call read function from unistd.h, I get:
file.cpp:21: error: no matching function for call to ‘File::read(int&, char*&, int)’
file.cpp:17: note: candidates are: char* File::read()
What am I doing wrong? These have completely different signatures, why can't I simply call it?