imitate a frame with cplusplus