title: C++ Exceptions and handling
body: <p>I am new to writing exceptions in c++ and I am struggling with an error. I won't get very much into detail 'cause I don't think this is relevant for the problem that I have.</p>
  
  <pre><code>#ifndef _STUDENT_H_
  #define _STUDENT_H_
  #include &lt;string&gt;
  #include &lt;map&gt;
  #include &lt;vector&gt;
  #include &lt;stdexcept&gt;
  #include &lt;iostream&gt;
  class NoMarkException: public exception
  {
  public: NoMarkException():exception(){
          cout&lt;&lt; "No marks were found." &lt;&lt; endl;
      }/*
      NoMarkException(const string &amp;name){
      cout &lt;&lt; "No marks for " &lt;&lt; name &lt;&lt; " were found."&lt;&lt; endl;
      }*/
  };
  #endif
  </code></pre>
  
  <p>This is my NoMarkException class</p>
  
  <pre><code>float Student::getMaxMark() const throw(NoMarkException) {
  if (marks.empty()) {
      throw NoMarkException::NoMarkException();
  }
  
  float final = 0;
  
  for (it = marks.begin(); it != marks.end(); it++) {
      if ((*it).second &gt; final) {
          final = (*it).second;
      }
  }
  
  return final;
  }
  </code></pre>
  
  <p>And this is my Student.cpp</p>
  
  <p>When I am building the project I get <strong>error: cannot call constructor 'NoMarkException::NoMarkException' directly</strong>
  Any ideas why it is causing the problem?</p>