As I don't know what you have read so for I will start with an overview tutorial.
This article doesn't describe any implementation details, but it covers the architecture and use cases pretty well.
USSD TUTORIAL[
^]
Here you can download C++ or C# code from MSDN:
USSD message management sample[
^]
You probably also need a SMSC simulator unless you have a provider that will respond to your messages.
SMSC Simulator[
^]