Take a look at the CNiMath and CNiReal64Vector (CNiVectorT<>) classes in the Measurement Studio for Visual C++ reference. You could have one CNiReal64Vector that will contain the entire sequence, and another temporary CNiReal64Vector that will hold the segments of the sequence. Pass the temp vector to CNiMath::SineWave and then append it to the main vector via the CNiReal64Vector::Append method. Repeat with CNiMath::SquareWave, then CNiMath::SineWave again, and repeat the sequence as desired.
- Elton