Here is some outside links regarding guitar amps and cabs:
A guitar preamp using biquads and a waveshaperhttp://www.redfelineninja.org.uk/daniel/?p=184Cabinet simulation using biquad filtershttp://www.redfelineninja.org.uk/daniel/?p=171Cabinet simulatorshttp://www.hexeguitar.com/diy-cabsims_egraphic EQ as cabinet simulator?http://www.diystompboxes.com/smfforum/i ... ic=48850.0Of course, this is just the tip of the iceberg regarding info on the internet. But these are some of the ones I used for my attempt at a guitar cab sim.
As KG_is_back said, For a first approach, you can try and simulate the actual circuits of the amp schematic and there are already plenty of C++ code already out there for doing that (tube sim, etc.). A second approach to creating a guitar amp sim is to look at each main circuit or section of a amp (pre-amp, tone stack, gain, etc.) and try and simulate that portion with something that approximates the function with out trying to actually reproduce the exact circuit. A third approach is to actually measure the phase and frequency response of each circuit and try and simulate each with a combination of the two first approaches. My attempt at a guitar amp was approached more from following the second way listed.
For my cabinet simulation, I followed the example as discussed in the second link listed above and used the Biquad Designer software (listed below) to obtain the coefficients for the biquads to simulate the cab response:
http://www.arachnoid.com/BiQuadDesigner/index.htmlIdeally if you could simulate the frequency response curve of the guitar cab, you could store the coefficients and biquad configuration (type of filters, i.e. high and low self, notch, bandpass, etc.) and be able to simulate/approximate a number of guitar cabs.
A lot of people also use IR (impulse response) to simulate cabinets and even to simulate different playing environments (large rooms, cathedral, etc.). This approach is a little more complicated because you must be a to perform convolution of the incoming guitar signal and the IR.