title: Reading time - code was working fine earlier, now gives error
body: <p>I am trying to read time for an assignment. I am using the following code. It was working fine earlier, but now gives an error:</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;ctime&gt;
  #include &lt;vector&gt;
  #include &lt;sstream&gt;
  
  using namespace std;
  
  #define LOG(x) cout &lt;&lt; x &lt;&lt; endl
  
  class Date
  {
  private:
      string date;
      string time;
      string day;
      string month;
      string year;
      string WeekylQuote;
  
  public:
      void TimeReadFromSystem(string &amp;str) //this function read time of system
      {
          time_t my_time = time(NULL);
          
      }
  
      void StorerOfAscTimeIntoVariables(const string &amp;str)
      {
          vector&lt;string&gt; strTok;
          istringstream ss(str);
          string deliminiters;
          while (ss &gt;&gt; deliminiters)
          {
              strTok.push_back(deliminiters);
          }
          //for (auto i : strTok)
          //cout &lt;&lt; i &lt;&lt; endl;
          //OUTPUT
          //Thu
          //Apr
          //22
          //00:46:59
          //2021
  
          // storing now day month year in respective variables
          date = (strTok[2]);
          month = (strTok[1]);
          year = (strTok[4]);
          time = (strTok[3]);
          day = (strTok[0]);
      }
  };
  </code></pre>
  <p>The error occurs on <code>time(NULL)</code>:</p>
  <blockquote>
  <p>type 'std::string' (aka 'basic_string') does not provide a call operator</p>
  </blockquote>
  <p>I have also noticed if I create another <code>.cpp</code> and just implement that function, it seems to work, but in the code I have written for my assignment it doesn't work.</p>