DCSS is in a mix of c++, lua, javascript (for webtiles), and python (for the webtiles server); for libraries it uses SDL2 as the graphics library for tiles and a custom websockets/jquery/ajax thing for webtiles. I don't really recommend DCSS as a good model for roguelike or game design, as it's a very old, complicated, and layered codebase, with roots long before using interpreted languages was viable. For most people starting out writing a roguelike (or related) game c++ is not going to be the best choice, I'd probably recommend an interpreted language, and in particular python. There are other factors that could push you towards something like c++ eventually, but prototyping in an interpreted language is still likely to be much easier. (Example factor: I suspect a pure python version of dcss wouldn't be viable because we need volunteer/cheap servers to be able to run as many instances as possible; this is actually just speculation though and I might be wrong given 2017+ cloud resources.)
If your game idea is roguelike enough there's a bunch of specific libraries around that can handle some of the graphics and turn-based aspects, but I know less about game development outside the roguelike sphere (I'd still start with SDL2 personally). One great place to start if your game idea is in that sphere is
r/roguelikedev, which has a really immense amount of resources, FAQs, tutorials, etc. -- see the sidebar, plus the community thread links. The cogmind developer (u/Kyzrati) is one of the main admins there and has done a
huge amount of work developing the sub, making resources available, running community threads, etc.