static_cast<char*>(mmap((caddr_t)0, bytesToTransfer, PROT_READ, MAP_SHARED, fd, 0 code example
Example: error: invalid conversion from ‘void*’ to ‘char*’ [-fpermissive] mmap
data = static_cast<char*>(mmap((caddr_t)0, bytesToTransfer, PROT_READ, MAP_SHARED, fd, 0));
You need to cast it. :)