C++ is a pragmatical, object oriented general-purpose programming language, initially an extension of C and designed and implemented in 1979 by Bjarne Stroustrup from the Bell Laboratories. C++ is pragmatical because one may write in "usual" C-style, using the C standard library (printf, strcpy, ...), except perhaps using C++ comments and references up and then (instead of pointer). On the other hand C++ allows to design classes and interfaces (pure virtual classes) in a more object oriented manner. There are lots of free and commercial class libraries for arithmetics, database related stuff, portable and proprietary window management and whatever else.
Classes as declaration for objects are more or less C-Structures. None static functions may be declared inside the scope of a class. Those functions, called Member function have an implicit parameter called "this", a pointer to this structure, allocated either inside the data segment as static or global, via "new" (malloc) on the heap or as automatic object (variable) on the stack.
For instance an array of member-function pointers of a class CNode, which is indexed by arbitrary pieces code - as switch-case replacement via indirect call/jump. The special atomic C++ operator '->*' is used to call the indexed member-functions:
Table of Contents
C++ is a pragmatical, object oriented general-purpose programming language, initially an extension of C and designed and implemented in 1979 by Bjarne Stroustrup from the Bell Laboratories. C++ is pragmatical because one may write in "usual" C-style, using the C standard library (printf, strcpy, ...), except perhaps using C++ comments and references up and then (instead of pointer). On the other hand C++ allows to design classes and interfaces (pure virtual classes) in a more object oriented manner. There are lots of free and commercial class libraries for arithmetics, database related stuff, portable and proprietary window management and whatever else.
C Extensions
References
Exception Handling
Classes
Classes as declaration for objects are more or less C-Structures. None static functions may be declared inside the scope of a class. Those functions, called Member function have an implicit parameter called "this", a pointer to this structure, allocated either inside the data segment as static or global, via "new" (malloc) on the heap or as automatic object (variable) on the stack.Data Definition
Member Functions
Modifiers
Public
Protected
Private
Static
Pointer to member-functions
For instance an array of member-function pointers of a class CNode, which is indexed by arbitrary pieces code - as switch-case replacement via indirect call/jump. The special atomic C++ operator '->*' is used to call the indexed member-functions:Inheritance
Function overloading
Operator overloading
Late binding
Abstract Classes
Pure Abstract Classes
Multiple Inheritance
Templates
Class Design of a Chess Engine
main article Class Design of a Chess EngineC++ Compiler
GCC Explorer - Interactive Compiler
Libraries
NIH Class Library — Software Preservation Group, The Computer History Museum [1]
See also
C++ Publications
1985 ...
1990 ...
1995 ...
2000 ...
2005 ...
2010 ...
Andrew Koenig at Dr Dobbs
Forum Posts
1997 ...
Re: Search Degredation w/ C++ by Amir Ban, rgcc, June 17, 1997
Re: object oriented chess programming by Dave Fotland, rgcc, January 06, 1998
2000 ...
2005 ...
2010 ...
- c or c++ ? by ethan ara, CCC, July 10, 2011
2012- C++ templates question by José C. Martínez Galán, CCC, January 18, 2012
- C++11 for chess engines by Marco Costalba, CCC, September 03, 2012
- Has GCC caught up with Intel with respect to performance? by Don Dailey, CCC, October 07, 2012
2013- Need Help Getting GCC Working?!? by Steve Maughan, CCC, April 23, 2013
- [ub] Objectives and tasks for SG12 by Gabriel Dos Reis, Open Standards, The ub Archives, May 29, 2013
- C++ Question by Ted Wong, CCC, July 30, 2013 » Thread
20142015 ...
External Links
Calling conventions for different C++ compilers and operating systems (pdf) by Agner Fog
References
Up one Level