vendredi 26 décembre 2014

What is equivalent mmap in C++ for linux?


what is equivalent mmap into C++ ?


I have code like below



LCDdata = mmap(NULL, iFrameBufferSize, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, fb_fd, 0);


where LCDdata is unsigned char type pointer, iFrameBufferSize is int type and fb_fd is static int type.


when I compile it by use of arm g++ tool chain it give me error as below



error: invalid conversion from 'void*' to 'unsigned char*' [-fpermissive]


so how can I use any equivalent type function instead of mmap ?


which header file I should include ? and how this new line's syntax will become ?


I am new to C++ so I don't know about this.


Thanks and Regards



Aucun commentaire:

Enregistrer un commentaire