
C++primer
文章平均质量分 81
andy cong
何以解忧,唯有编程
展开
-
Quote
Quote.h#ifndef QUOTE_H#define QUOTE_H#include #include class Quote{ friend bool operator !=(const Quote& lhs, const Quote& rhs);public: Quote() { std::cout << "default constructing Q原创 2017-03-19 11:08:29 · 800 阅读 · 0 评论 -
Chapter.14 Overloaded Operations and Conversions
Overloaded operators are functions with special names: the keyword operatorfollowed by the symbol for the operator being defined. Like any other function, anoverloaded operator has a return type,原创 2017-03-06 22:25:33 · 463 阅读 · 0 评论 -
Chapter 15. Object-Oriented Programming
An OverviewThe key ideas in object-oriented programming are data abstraction, inheritance, and dynamic binding. Using data abstraction, we can define classes that separate interface from implement原创 2017-03-06 22:25:54 · 450 阅读 · 0 评论 -
Chapter.16 Templates And Generic Programming
Introduction Both object-oriented programming (OOP) and generic programming deal with types that are not known at the time the program is written. The distinction between the two is that OOP de原创 2017-03-06 22:26:39 · 850 阅读 · 0 评论 -
Chapter.13 Copy Constructor
the copy constructorWhat is a copy constructor? When is it used?A copy constructor isa constructor which first parameter is a reference to the class type and any additional parameters havede原创 2017-03-06 22:24:36 · 2353 阅读 · 0 评论