You can do this in C++ a couple of different ways. If you are not on Windows, you should use the DAQmx Base C API to write this application. However, if you are on windows, and using CVI, or Visual Studio, you can do this in DAQmx Base, through the C API, or DAQmx through the C API. I would suggest using DAQmx if you are on windows.
Also, if you have Measurement Studio, then you have access to our C++ API for DAQmx, allowing you to use classes, as well as supplying graphs and charts to display your data.