Assigning Values to Array

 

I have a simple formula that is calculating the FastK. I am using the ds array to allow me to access historical values as well. When I use the Print statement, it shows that it is calculating the formula properly, but it is not assigning the value to the specified array element. I have attached an image showing the output log. Anyone know why this would happen?

class FastK
{
public:
   // Variables
   int Length;
   double ds[];
   
   // Constructors   
   FastK(void){};
   FastK(int length)
   {
      Length=length;
      ArraySetAsSeries(ds,true);
   };  
   
   void Calculate(int shift)
   {
      int bar = Bars-IndicatorCounted();
      if (bar<Length)      
         return;  
         
      double lowest = Low[iLowest(NULL,0,MODE_LOW,Length,shift)];
      double highest = High[iHighest(NULL,0,MODE_HIGH,Length,shift)];
      double num = Close[shift]-lowest;
      double den = highest-lowest;            
      
      if (den!=0)
      {                  
         ds[shift]=num/den*100;
         Print("ds = ",ds[shift],", formula = ",num/den*100);
      }
      else      
         ds[shift]=0;   
   };
};
 
DS has no size. You can't assign to it until you resize it.
 
You are a gentleman and a scholar! I had a feeling I was overlooking the obvious. Thank you for your assistance.
Reason: