I guess it mostly depends on how exactly you want it to look like.
One way would be to draw your map and then draw the darkened areas with rects over it, this could work for a tile based map.
For more complex shapes you could use texture blending with a black and white texture representing the explored areas, and texture blending set to SDL_BLENDMODE_MOD.