结构体作为类中成员变量,同时,要在类的一个成员函数中动态创建结构体类型的数组。 //FSE.h #ifndef FSE_H #define FSE_H #include <iostream> using namespace std; class FSE { struct Grad; public: FSE(); void SetGss(float predelay, float strength_dephase, float dur_dephase, float strength_rephase, float dur_rephase, float space, float delay, int etl); struct Grad { friend ostream& operator<<(ostream& os, const Grad& grad); float Predelay; float StrengthDephase; float DurDephase; float StrengthRephase; float DurRephase; float Space; float Delay; }*pGss; int nGss; }; #endif //FSE.cpp #include "stdafx.h" #include <iostream> #include "FSE.h" using namespace st