title: Having problems with an extra qualification error in c++11 compiler
body: <p>I'm a c++11 student and I'm having trouble with an extra qualification error.</p>
  
  <p>I have a class declared in a .h file and the implementation for a boolean function in a separate .cpp file. </p>
  
  <p>The class definition is as follows:</p>
  
  <pre><code>class Order{
        std::string customer, product;
        std::vector&lt;std::string&gt; itemList;
  
        bool validName(std::string name);
        bool isCustomerName(std::string name);
        bool isProductName(std::string name);
        bool isItemName(std::string name);
  
  public:
  
        Order(std::vector&lt;std::string&gt; line);
        void print(){
        void graph(std::ofstream os);
  };//class Order
  </code></pre>
  
  <p>all of the functions are implemented in a separate cpp file, and I have scoped all of the functions in the following manner:</p>
  
  <pre><code>Order::Order(std::vector&lt;std::string&gt; line){
  </code></pre>
  
  <p>or</p>
  
  <pre><code>bool Order::isCustomerName(std::string name){
  </code></pre>
  
  <p>When I try to compile the cpp file, this error comes up:</p>
  
  <pre><code>error: extra qualification ‘Order::’ on member ‘Order’ [-fpermissive]
  </code></pre>
  
  <p>After looking it up, it seems to be an error related to using the scope operator either in the class definition on the same function or some kind of double use of the scope operator.</p>
  
  <p>I haven't encapsulated the implementations in the cpp file in a separate namespace and I have only included the corresponding .h file for the cpp file. Can someone please give me a little push in the direction I need to look at to solve this issue?</p>
  
  <p>Thanks</p>
  
  <hr>
  
  <p>This is the top of the cpp file:    </p>
  
  <pre><code>#include &lt;fstream&gt; 
  #include &lt;iostream&gt; 
  #include &lt;vector&gt; 
  #include &lt;string&gt; 
  #include "order.h" 
  </code></pre>
  
  <p>this is a sample function from the same cpp: </p>
  
  <pre><code>bool Order::isProductName(std::string name){ 
      if (name.size() &gt; 0 &amp;&amp; isalpha(name[0])) 
          return true; 
      return false; } 
  </code></pre>
  
  <p>The class definition listed above is literally everything that's in the .h for class Order. </p>
  
  <p>the top of the .h is: </p>
  
  <pre><code>#pragma once 
  #include &lt;fstream&gt; 
  #include &lt;iostream&gt; 
  #include &lt;vector&gt; 
  #include &lt;string&gt; 
  #include "util.h"
  </code></pre>