Category : C Source Code
Archive   : BCPPTECH.ZIP
Filename : TI808.ASC

 
Output of file : TI808.ASC contained in archive : BCPPTECH.ZIP







PRODUCT : Turbo C++ NUMBER : 808
VERSION : 1.01
OS : DOS
DATE : February 25, 1992 PAGE : 1/1

TITLE : Rules for Compiler Generated Constructors




The C++ language provides constructors when none are defined.
Here are the rules used by the Turbo C++ compiler to generate
such constructors:

The default constructor T::T() is automatically defined if there
are no constructors explicitly provided in the class definition.

The copy constructor T::T(constT&) or T::(T&) is automatically
defined if there is not a copy constructor explicitly provided in
the class definition. The copy constructor will call the copy
constructor of all base classes and member functions. It uses the
const form if it can, and the non-const form otherwise.

The assignment operator T& T::operator= (const T&) or (T&) is
defined if there is not an 'operator=' defined that has a 'T' or
'T&' as one of its arguments.

The copy constructor is not generated if there is a constructor
that can be called with a 'T' as its only argument.

The 'operator=' is not generated if there is a form with a 'T' as
any argument.

The copy constructor (or operator=) is called member-wise in the
generated version of these functions. If there is a member with
a private copy constructor (or operator=) than the FUNCTION is
not generated. I think that is not quite correct-- it ought to
work if this class is a FRIEND of that class. Also, the
operator= is not defined unless it is actually used.






















  3 Responses to “Category : C Source Code
Archive   : BCPPTECH.ZIP
Filename : TI808.ASC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/