title: error: qualified-id in declaration before ‘(’ token
body: <p>there is the code :</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;cmath&gt;
  using namespace std;
  
  class Flacon
  {
  private:
    string nom;
    double volume;
    double pH;
  
  public:
      Flacon(string nom, double volume, double pH): nom(nom), volume(volume), pH(pH) {}
      ostream&amp; etiquette(ostream&amp;) const;
      friend ostream&amp; operator&lt;&lt;(ostream&amp;,const Flacon &amp;);
      Flacon&amp; operator+(Flacon const&amp;);
  
  };
  
  Flacon&amp; Flacon::operator+(Flacon const&amp; f){
      this-&gt;nom=this-&gt;nom + f.nom;
      this-&gt;volume+= f.volume;
      this-&gt;pH=-log((this-&gt;volume * pow(10,-this-&gt;pH) + f.volume * pow(10,-f.pH))/(this-&gt;volume + f.volume));
      return *this;
  
  ostream&amp; Flacon::etiquette(ostream&amp; sortie) const {
      sortie &lt;&lt; nom &lt;&lt; " : " &lt;&lt; volume &lt;&lt; " ml, pH " &lt;&lt; pH;
      return sortie;}
  </code></pre>
  
  <p>I have the error :</p>
  
  <blockquote>
    <p>error: qualified-id in declaration before ‘(’ token</p>
  </blockquote>
  
  <p>At line 27 :</p>
  
  <pre><code>ostream&amp; Flacon::etiquette(ostream&amp; sortie) const {
  </code></pre>
  
  <p>Thank you for your help</p>
  
  <p>I would also like to know why this.name displays an error when this->name does not display one</p>