Quantcast
Viewing latest article 9
Browse Latest Browse All 20

Date manipulation question

void GetMonth(string &date)
{
  string Month;

  Month =  date.substr(0,2);
  
}

Ok, so you computed the value of Month. But you don't do anything with it. Remember, this is a variable that is local to the function only. Did you intend to return the value to the caller, perhaps?

Viewing latest article 9
Browse Latest Browse All 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>