title: "does not name a type" error when referencing a typedef from a class
body: <p>I have the following definition of a typedef in a class</p>
  
  <pre><code>/*
   *ReportData.h
   */
  class ReportData {
  
  public:
  
      /** Classifiers information  **/
      typedef struct{ 
          char *classifier;
          uint8_t numCategories;
          char **categories;    
          int *ranges;          
      } Classification;
  };
  </code></pre>
  
  <p>This code is later referenced as follows</p>
  
  <pre><code>/*
   * DynamicCarDetection.cpp 
   */
  
      #include &lt;DataReport.h&gt;
  
      int numOfClassGroups = 1;
      int numOfCategories = 2;
      ReportData::Classification *vehiclesClassificators;
  
      vehiclesClassificators = new ReportData::Classification[numOfClassGroups];
  
      vehiclesClassificators[i].numCategories = NumOfcategories;
      vehiclesClassificators[i].categories = new char *[numOfcategories];
  </code></pre>
  
  <p>When I try to compile with this command</p>
  
  <pre><code>g++ -c DynamicCarDetection.cpp -I ./
  </code></pre>
  
  <p>I get this error on each reference to vehiclesClassificators</p>
  
  <blockquote>
    <p>DynamicCarDetection.cpp:12:1: error: ‘vehiclesClassificators’ does not
    name a type</p>
  </blockquote>
  
  <p>Looks like an obvious error of name scoping, but I've struggling to understand what the problem is, because apparently, the typedef ReportData::Classification is being recognized. </p>
  
  <p>Many thanks in advance</p>