examples: getinmemory: cast to char pointer

The cast is needed on some systems to avoid following compile error:
error: invalid conversion from 'void*' to 'char*' [-fpermissive]

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>