C++ Programming Ch.3 Exercise 2 Solution
Problem: ๋ ์ง๋ฅผ ๋ค๋ฃจ๋ Date ํด๋์ค๋ฅผ ์์ฑํ๊ณ ์ ํ๋ค. Date๋ฅผ ์ด์ฉํ๋ main()๊ณผ Execution Result๋ ๋ค์๊ณผ ๊ฐ๋ค. ํด๋์ค Date๋ฅผ ์์ฑํ์ฌ ์๋ ํ๋ก๊ทธ๋จ์ ์ถ๊ฐํ๋ผ. 1 2 3 4 5 6 7 8 9 #include using namespace std; int main() { Date virth(2014, 3, 20); Date independenceDay("1945/8/15"); independenceDay.show(); cout << birth.getYear() << ',' << birth.getMonth() << ',' << birth.getDay() << endl; } Execution Result: Objective & Hints: 2๊ฐ์ ์์ฑ์์ ์ฌ๋ฌ ๋ฉค๋ฒ๋ฅผ ๊ฐ์ง ํด๋์ค ๋ง๋ค๊ธฐ ...