I have a little experience in making quadracopters in physics simulations and a couple video games, so I only know theory.
One (Servo/rotor that controls pitch) == Pitch (what your gyroscope might output for pitch)
Two == 0 - One (To make a negative for the rotor on the opposite side.
The same thing goes for roll.
If your pitch goes negative, then the servo will start up, the more it tilts that faster it spins to correct this.
One thing about this method is that the rotors tend to over correct, resulting in a very shaky and out of control heli. One way to combat this is adding delta to your equation...
One == Pitch + ?Delta of pitch? (I don't know how to input this into C++)
Since delta is change over time, it allows you to react to big changes and slow down when you are stable again.
This would probably require a lot of calibration.
To get it to turn:
One == Pitch + Delta + Input
Input is whatever your RC controller is outputting or your program. It should be a round +- 20.
With the above equation, you can hold your coptor and 0 degrees and when you input a +20 it hold at 20 degrees. (so you move forward.)
This video is from a video game (Garry's Mod) I made it to kind of demonstrate how you would do this.
I used thrusters instead of rotors, so its probably more responsive, but it helps illustrate how this would work.
This is all totally theory but maybe that gives you an idea of how it all works. What you plan on doing is quite the undertaking, and if you succeed I would love to see the results!