struct cpp constructor