CS 1337 Lecture Notes - Lecture 11: Operator Overloading

10 views4 pages

Document Summary

// description : hello world in c++, ansi-style. //using operator overloading - can change the meaning of an operator. //cannot change the number of operands for the operator. //friend - a function or class that is not a member of the class, but still has access to private members of the class. //can be a function or an entire class or a single method of a class. //forward declaration - when i declare that i will later declare a class class rectangle; class rectangle private: of this variable. of this class public: (attributes) static int getcount() //can also have static methods - can only access other static members. //instance variables - each object (instance of this class) has their own copy. //static variables - one variable that is shared among all objects (instances) static int counter; double width; double length; return counter; Rectangle(double side = 0. 0); //is a default construction.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents