typos in set functions

From: Siemel Naran (SiemelNaran_at_REMOVE.att.net)
Date: 11/30/04


Date: Tue, 30 Nov 2004 10:34:04 GMT

Is there any trick to avoid typos in set functions, such as

void date::set(int day, int month, int year) {
   d_day = day;
   month = month; // oops: should be d_month = month
   d_year = year;
}



Relevant Pages