title: File is not created, but it works
body: <p>I want to make a project using file repository, but I have a problem that it doesn't create the file which I read from the console. What should I do so it will also create the file?</p>
  
  <pre><code>int FileRepository::addDog(const Dog&amp; dog)
  {
      if (this-&gt;findDog(dog.getName()) != -1)
          return -1; 
      std::ofstream fout;
  
      //cout &lt;&lt; dog&lt;&lt;"\n";
      //cout &lt;&lt; this-&gt;fileName;
  
      fout.open(this-&gt;fileName.c_str(), std::ios_base::app);
      fout &lt;&lt; dog;
      fout.close();
      return 0;
  }
  </code></pre>
  
  <pre><code>ostream&amp; operator&lt;&lt;(ostream&amp; outputStream,const Dog&amp; dog)
  {
      outputStream &lt;&lt; dog.name &lt;&lt; ", " &lt;&lt; dog.breed &lt;&lt; ", " &lt;&lt; dog.birthDate &lt;&lt; ", " &lt;&lt; dog.numberOfShots &lt;&lt; ", " &lt;&lt; dog.photo &lt;&lt;'\n';
      return outputStream;
  }
  </code></pre>
  
  <p>The commented lines are printing fine. this->fileName would be the full path of that file. For example if i give the desktop path, I don't see any new text file, but the program passed the uni online tests.</p>
  
  <p>One university test looks like:</p>
  
  <pre><code>fileLocation C:\tmp\GamifyCs\gpie2724\Files and tests\e01364e3-f98c-4348-bdb6-1ec7d611d5c7\add+list.txt
  
  mode A
  
  add 123, abc, 01-01-2000, 456, def
  
  list
  
  exit File contents:
  123, abc, 01-01-2000, 456, def
  </code></pre>