title: Invalid types 'int[int]' for array subscript error
body: <p>I'm migrating into C++ from Java world and am trying to port over an example. I'm getting an error in that I'm not accessing my arrays correctly. I tried pointing to them, using -> and * notation but I'm having a hard time getting my head around it. I believe it's the same basic error repeated multiple times. I've highlighted the three areas where the errors begin, excluding the multiples of the same error. Any help would go a long way in my understanding of the topic. Thanks!</p>
  
  <pre><code>//--------------------------------------------------------------
  void testApp::setup(){
      colorCount = 20;
      int *hueValues = new int[colorCount];
      int *saturationValues = new int[colorCount];
      int *brightnessValues = new int[colorCount];
  
  ofColor::fromHsb(360, 100, 100, 100);
  ofFill();
  }
  
  //--------------------------------------------------------------
  void testApp::update(){
  
  }
  
  //--------------------------------------------------------------
  void testApp::draw(){
      // ------ colors ------
      // create palette
      for (int i=0; i&lt;colorCount; i++) {
          if (i%2 == 0) {
              hueValues[i] = (int) random(0,360);                  // invalid types 'int[int]' fr array subscript
              saturationValues[i] = 100;  
              brightnessValues[i] = (int) random(0,100);
          } 
          else {
              hueValues[i] = 195;
              saturationValues[i] = (int) random(0,100);
              brightnessValues[i] = 100;
          }
      }
  
      // ------ area tiling ------
      // count tiles
      int counter = 0;
      // row count and row height
      int rowCount = (int)random(5,40);                  // At this point in file
      float rowHeight = (float)ofGetHeight()/(float)rowCount;
  
      for(int i=0; i&lt;rowCount; i++) {
          // seperate each line in parts  
          // how many fragments
          int partCount = i+1;
          parts = new float[0];                  // Cannot convert "float" to "float" in assignment
  
          for(int ii=0; ii&lt;partCount; ii++) {
              // sub fragments or not?
              if (random(1.0) &lt; 0.075) {
                  // take care of big values      
                  int fragments = (int)random(2,20);
                  partCount = partCount + fragments; 
                  for(int iii=0; iii&lt;fragments; iii++) {
                      parts = append(parts, random(2));
                  }              
              }  
              else {
                  parts = append(parts, random(2,20));   
              }
          }
  
          // add all subparts
          float sumPartsTotal = 0;
          for(int ii=0; ii&lt;partCount; ii++) sumPartsTotal += parts[ii];
  
          // draw rects
          float sumPartsNow = 0;
          for(int ii=0; ii&lt;parts.length; ii++) {
              // get component color values
              int index = counter % colorCount;
              fill(hueValues[index],saturationValues[index],brightnessValues[index]);
  
              sumPartsNow += parts[ii];
              rect(map(sumPartsNow, 0,sumPartsTotal, 0,width),rowHeight*i, 
                   map(parts[ii], 0,sumPartsTotal, 0,width)*-1,rowHeight);
  
              counter++;
          }
      }  
  }
  </code></pre>