Back to Browse

C++ Tutorial: Create a Class - Example: Dates and function returning the Weekday of any given date

671 views
Oct 4, 2022
13:13

In this video we'll see how to create a Class in C++. In particular, we are going to create a class for Dates, with its constructor, getters/setters and some useful functions. We implement an algorithm, called the Zeller's algorithm, which receives in input a date in the past or in the future, and returns a string specifying which day of the week is that. For example: if the input is the date 02-Oct-2022, the function will return the string "Sunday".

Download

1 formats

Video Formats

360pmp416.5 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

C++ Tutorial: Create a Class - Example: Dates and function returning the Weekday of any given date | NatokHD