Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    cpp
  » Operator Overloading
      by Valmont
 Page 1 of 27 
    Next >

(Login to remove green text ads)
Preface
Preface

The first chapter addresses a few simple straightforward issues, which are not obscured by complex code. Only a basic demonstration is shown, as a means of introduction.
Chapter two will build upon chapter one and addresses a few optimizations. The simplicity of operator overloading remains present, although a bit more concentration will be needed. Here we will introduce the “Return Value Optimization” technique.
Chapter three assumes you understood the very basics we earlier covered in previous chapters. Basically chapter three is only a demonstration on implementing various overloaded operators. I try to demonstrate that operator overloading is nothing more then using your common sense, as a C++ programmer.
Chapter four is not a real tutorial more or less. It is meant as a supplement to cover some additional topics, without digging too deep. If you studied the previous chapters, you won't need explanation anyway.

Many (potential) programmers who study the ways of operator overloading are less seasoned C++ coders. Young students are an example. A recap of certain aspects is in its place I think, so the lesser seasoned coder has the chance to review relevant topics to this tutorial without opening additional books all the time. But first, the student should definitely read the tutorial that covers the “this” keyword and the tutorial on the “Rule Of Three”, also to be found in this C++ tutorials section.

I've chosen for the ever-present String class as a starting point for serious coverage, so that the students will receive some (extra) basic "C-style string handling" skills as well. Besides, such a class will cover many of the basics which you (most likely, and should) have studied already in your primary C++ course. For example, we will use dynamically allocated memory quite a bit.

Notice that this tutorial doesn't pretend (nor does intend) to be complete or highly accurate. I've chosen for an informal style. Detailed explanations of the mechanics and internal workings behind the topics in this tutorial can be found in many places on the Internet though. On the last page I will present you my primary sources. They can be your guide for further reading.

Contact

Contact Method One:

Address Valmont in the Standard C++ Forum

Contact Method Two:

Send me a MAIL




 
 Page 1 of 27 
    Next >

Rate This Article
1 2 3 4 5 6 7 8 9 10





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle