Well, C++ does not provide the facilities you ask "out of the box". You could code it yourself if you had good knowledge of C++, perhaps some knowledge of assembly, some knowledge of operating system design and in-depth knowledge of the hardware of that device. Since you say you are a novice you probably do not have that.
So what you could do is use a library of classes/methods(C++) or functions(C) that will allow you to "communicate" with the device through a C++ program. Of course that is only possible if such a library exists and is available.
Alternatively you could use your own operating system's functionatily exposed to you through a set of functions found in your OS developer documentation. These set of functions, also called API, will provide you some control of the device but depending on the device what you can do may be limited.