Explicit.cpp

#include <iostream>
#include <stdlib.h>


class MDate
{
public:
	MDate() { m_nMonth = m_nDay = m_nYear = 0; }
	MDate( const char* Date )
	{
		m_nMonth = atoi(Date);
		while( *Date && *Date != '/' )
			Date++;
		m_nDay = atoi(Date);
		while( *Date && *Date != '/' )
			Date++;
		m_nYear = atoi(Date);
		cout << "MDate ctor called, implictly.  The explicit keyword would stop this.
	}

protected:
	int m_nDay, m_nMonth, m_nYear;	
};


int main()
{
	MDate A;

	A = "5/6/1999";
}