Week-12
Week-12
Concepts
#include <iostream>
using namespace std;
class Count {
private:
int value;
Example 1 public:
// Constructor to initialize count to 5
int main() { Count() : value(5) {}
Count count1; // Overload ++ when used as prefix
void operator ++ () {
// Call the "void operator ++ ()" function ++value;
++count1; }
• https://
harshityadav95.medium.com/object-oriented-programming-c-d2
42601be045
• https://
www.programiz.com/cpp-programming/operator-overloading
• https://www.geeksforgeeks.org/copy-constructor-vs-assignment-
operator-in-c
/
• https://
www.tutorialride.com/cpp/friend-function-using-operator-overlo
ading-in-c.htm
36
THANK YOU