use c++ casts