You'll need a graphics library of some sort, as this sort of thing isn't possible in the console.
Personally, I'd use OpenGL but there's a learning overhead there and it's not particularly friendly. I'd imagine it's possible using some 2D library like SFML. I have limited knowledge of that, though (literally only used SFML for an OpenGL context in the past).
You might even have better luck Googling for C++ graph drawing libraries.