Apart from difference of the syntax for defining functions (methods) within a class and outside class, When you define them within the class, C++ automatically makes them inline without explicitly mentioning it. While outside class definition of function doesn't makes it inline without prefixing with keyword 'inline' before the return type of the method in the header file for class
While doing design for a software, what things enforce to use template classes and template functions ? Is it consider best practices or not ?
When a function is declared as virtual and when a class ? Please explain with examples.
Given a Calendar class (there are three fields, year, month, day) and a number of N, Implement a function that returns the calendar after N days.
Example: Input: {2017, 3,20} and 12, Output: {2017,4, 1}