Introduction to OOP: Chapter 4: Messages, Instances, and Initialization: [next] [previous] [audio] [real] [text]

Syntax for Automatic Creation

In C++ and Object Pascal (and sometimes in Objective-C) memory for variables is most often created using a simple declaration statement. Space is then automatically created.


Card aCard;	// C++ declaration

var
	aCard : Card; 	{ Object-Pascal declaration }
Intro OOP, Chapter 4, Slide 5