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
  » Keyword: this (pointer)
      by Valmont
 Page 1 of 3 
    Next >

(Login to remove green text ads)
Preface
Preface

The this keyword is a special pointer often used in operator overloading and miscellaneous object oriented concepts. There is not much to tell about this keyword, which means that this tutorial will be a short one. Nevertheless, one needs a thorough understanding of what this pointer means to move on with certain basics of the C++ language. A common theme is operator overloading. Operator overloading is not discussed in this tutorial.
Once again, the this pointer/keyword is not an intensive subject to study, so the code presented here will be very easy to understand.

Prerequisites:
  • Very basic knowledge and handling of classes and it's instances (objects).
  • Basic understanding and handling of pointers.
  • Basic understanding and handling of functions. This includes passing parameters by value and by reference.

Every code presented here is complete and ready to be copied into your console project. Only one *.cpp file is required.




 
 Page 1 of 3 
    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