Control Rig c++

Hello, I tried to get into the nitty gritty of control rig in c++ but it’s been a bit tough so i’m trying to get some help if anyone knows. The Goal is to create a c++ control rig class that has variables in it by default, Variables i can access once i create a control rig from that class and use as functions inputs or whatever. is that even possible? if so just a simple explanation would be massive.
Thanks.