oopexample[1] - ".\n" ; } int main ( int argc,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> using namespace std ; class Date{ private : public : int day ; int month ; int year ; Date( int a, int b, int c); void printDate(); }; Date :: Date ( int a, int b, int c){ day=b; month=a; year=c; } void Date ::printDate(){ cout << "Today's date is: " << month << "." << day << "." << year <<
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ".\n" ; } int main ( int argc, char * const argv) { int m, d, y; cout << "Please give month:" ; cin >> m; cout << "Please give day:" ; cin >> d; cout << "Please give year:" ; cin >> y; Date today(d, m, y); today. printDate (); return ; }...
View Full Document

This note was uploaded on 09/27/2011 for the course CGS 2421 taught by Professor Onal during the Spring '09 term at University of Florida.

Ask a homework question - tutors are online