Skip to Content
Absolute Beginner's Guide to Programming, Third Edition
book

Absolute Beginner's Guide to Programming, Third Edition

by Greg Perry
November 2002
Beginner content levelBeginner
432 pages
11h 44m
English
Que
Content preview from Absolute Beginner's Guide to Programming, Third Edition

Benefits of OOP

With this introduction to C++, you can better understand the advantages that C++ provides over more traditional, non-OOP languages. One of the benefits of OOP is that you can create your own operators. More accurately, you can change the way an operator works when the program uses that operator with one of your objects.

By writing special operator overloading member functions, you can make any C++ operator work on your own objects. For example, a plus sign is the addition operator that automatically works on all numeric values. The plus sign, however, cannot work on a Person object such as Mike. Therefore, if you wanted to add two Person objects together to get a total of the salaries, you could write a function that adds the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Absolute Beginner's Guide to Programming, Second Edition

Absolute Beginner's Guide to Programming, Second Edition

Greg Perry

Publisher Resources

ISBN: 0789729059Purchase book