I was wondering if there was a way to include a data member which is an array of unfixed size.
The function initModulation will create an int array of size M and a Complex array of size M. (Complex is another class and is made up of a real component and imaginary component).
The function modulate will need to be able to access these two arrays. These two arrays go out of scope after the init Modulation function is called. To avoid this, I would just make these two data members of the Modulator class, however I can't do that because the array size depends on M.
class Modulator
{
int M;
double phase;
std::string mapping;
public:
void initModulation(int M, double phase, std::string mapping);
double* modulate(int *input,int inputlength,int complexFlag);
};
Any ideas around this?
Thanks, Minh