The best simple way to construct such a program is to create a server program and have two client programs that connect to the server to post in a simple messaging or message board type format. There are almost literally hundreds of ways you could do this, but the server/client model is a good start. Start with something really simple, like sending short messages back and forth, and just go from there. The beauty of programming is in new discoveries simply by playing with code.
Another great thing about programming is anything you can't do is just something you haven't mastered yet. No matter how good a programmer you are, there's always something new to learn. I've yet to meet a zen master of C++.