> date1; cout << date1 << " is a valid date\n"; } catch(Chrono::Invalid){ cerr << "That is not a valid date\n"; return 1;"> > date1; cout << date1 << " is a valid date\n"; } catch(Chrono::Invalid){ cerr << "That is not a valid date\n"; return 1;">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lab 9 Instructions You can use g++ on build server, visual studio on local machine or your preferred C++ IDE. Important Note: For your grade, please show.

Similar presentations


Presentation on theme: "Lab 9 Instructions You can use g++ on build server, visual studio on local machine or your preferred C++ IDE. Important Note: For your grade, please show."— Presentation transcript:

1 Lab 9 Instructions You can use g++ on build server, visual studio on local machine or your preferred C++ IDE. Important Note: For your grade, please show me the result after you finish all the tasks. Make-Up Policies: If you cannot finish the drill in the lab, you can go back to work on it. You can send me (including result screenshot and source code) or show me in next lab.

2 Drill - Get two files in section 9.8 (Chrono.h and Chrono.cpp) to work with a simple main() followed by catch clause like: #include "Chrono.h“ #include "std_lib_facilities_4.h “ int main() { try{ Chrono::Date date1; cout << "Enter date as (year,month,day): "; cin >> date1; cout << date1 << " is a valid date\n"; } catch(Chrono::Invalid){ cerr << "That is not a valid date\n"; return 1;

3 Drill For now, put enough dummy “stub” code in the unimplemented functions in (Chrono.h and Chrono.cpp) to get them to compile. For example, put in bool leapyear(int y) function. //stub code for now //just always say it’s not leap year return false;


Download ppt "Lab 9 Instructions You can use g++ on build server, visual studio on local machine or your preferred C++ IDE. Important Note: For your grade, please show."

Similar presentations


Ads by Google