you assigned the BMAP pointer to the char and not the BMAP itsself. _maybe_ it will work if you change that.