Classes and Objects

Introduction
A class is a fundamental building block of the object oriented programming language C++. Bjarne Stroustup, the originator of C++ language, gave the name "C with classes" to this language initially. The class is the most important feature of C++. It implements OOP concepts and ties them together.
A class is a way to bind data (describing an entity) and its associated functions together. In C++, a class makes a data type that is used to create objects of this same type.
The prerequisites for classes and objects are structures and the functions. A structure provides a way to group data elements and a function organizes program actions into a named entity.
Class Specification
A class specification consists of two parts:
1. Class declaration
2. Class method definition
Declaration of a Class
A class is declared using the class keyword. the syntax of a class declaration is similar to that of a structure.
The general form of a class declaration is : LEARN MORE>>

No comments: