raw2dng is written in C, not C++. I'm not sure if Visual Studio can compile it, because I had to use -mno-ms-bitfields for unpacking the 14-bit stream with the raw_pixblock structure. I don't know the exact details, but I believe Microsoft uses a different ordering of bit fields in a structure (so one should probably rewrite struct raw_pixblock?)
But mingw and a good text editor should work pretty well.
Indeed, raw processing code in C may not be straightforward (mostly because of packed 14-bit data, and black/white levels). You can access a pixel with raw_get_pixel / raw_set_pixel (slow, but readable), or you could iterate through the image buffer with struct raw_pixblock * and use the PA / SET_PA and related macros (faster, but harder to write and to read), or you can unpack the raw data and copy it in whatever format you wish (for example, in chroma_smooth and cr2hdr code I found it easy to work with a large block of memory and address a pixel with buf[x + y*w], but others may prefer a matrix addressed with buf[y][x ], or to work on tiles and so on).
Also look in the dual ISO pdf, since it contains a short description of the raw format.