HTML - Creating Tables

A table is an excellent way of organizing information and presenting it in a readable and meaningful manner. 
The TABLE tag defines the beginning of the table. The use of CAPTION tag is optional. If you use it, a heading is given.
Next comes the TR tag. It stands for Table Row. It indicates the beginning of a row. Then to define the contents of each cell in that row, we have to use the TD tag which stands for Table Data

HTML - Creating Lists

A list is a set of items or phrases written one below the other and related to each other in some way. We make shopping lists, to-do lists, check lists etc. We may humber them from 1 onwards or we may put a symbol such as a star or circle at the beginning of each item.
The most commonly used lists in HTML are unordered and ordered lists. Unordered lists have a bullet before them. Ordered lists are numbered using integers or alphabets or roman numerals.

HTML - More on Inserting Components

Hyperlinking Images
You can even chose to hyperlink an image. To do that, first define the hyperlink tag. Then insert the image and then close the hyperlink tag.

Mailto Hyperlink
You may have noticed in most websites that there is a link called "Contact us" or "Send us a mail" etc, which allows the user to send an email to that website. You too can create such hyperlinks. It is called the mailto hyperlink.

Inserting Audio
You can insert audio into your webpage so that everytime the page is acessed and displayed on the screen, the audio clip would play in a continous loop. To dothat we must use the bgsound tag.


HTML - Inserting Components

Graphics are a very important part of any webpage. Apart from using images to illustrate certain points, clever use of images also makes our webpages more attractive and readable. But there is a disadvantage in having too many images in the page. Since the storage space that an image occupies is very high compared to text, a browser takes a vaery long time to display an image on the screen. Therefore, the more the number of images in a page, the longer it takes to download it from the server. We must therefore make judicious use of images in our webpages.
You can use two types of images in webpages - JPG nad GIF. JPG is an extension name for an image file that is created using Joint Photographic Experts Group format. GIF is the extension name for an image file that is created using the Graphics Interchange FormatLEARN MORE>>

Html Text Formatting

The basic formatting that can be applied to a webpage is for the text. By default, the Times Roman forn at 12 points is used. This can be changes according to our desire by using the FONT tag as shown belo
FACE : allows you to specify the font name like Times Roman, Courier, Arial etc.
SIZE: allows you to give a number from 1 (size 8 points) to 7 (size 36 points).

COLOR: allows you to specify the name of the color you wish to apply to the text.


HTML Formatting

First we have to let the browser know that this file is indeed a HTML file. So the first code in any HTML file must be:

So it follows that at the end of the file we must give the tag .

The actual content of the page must be put within the BODY tag. though this is not compulsory, it gives you control of the basic look of the page by allowing you to specify the general font and background feature. LEARN MORE>>

Html Introduction

What is HTML?HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language. HTML is not a programming language, it is a markup language. A markup language is a set of markup tags. HTML uses markup tags to describe web pages.
HTML markup tags are usually called HTML tags. HTML tags are keywords surrounded by angle brackets like . HTML tags normally come in pairs like and LEARN MORE>> .
HTML, XHTML, and CSS, Sixth Edition


Input / Output with Files

C++ has support both for input and output with files through the following classes:
                ofstream: File class for writing operations (derived from ostream)
                ifstream: File class for reading operations (derived from istream)
                fstream: File class for both reading and writing operations (derived from iostream)
Open a file
The first operation generally done on an object of one of these classes is to associate it to a real file, that is to say, to open a file. The open file is represented within the program by a stream object (an instantiation of one of these classes) and any input or output performed on this stream object will be applied to the physical file. LEARN MORE>>

Memory Management

The new Operator
In order to request dynamic memory there is the operator new. This operator new is followed by a data type and optionally the number of elements required within brackets[]. IT returns a pointer to the beginning of the block assigned memory. Its form is:

pointer=new type                       or
pointer=new type[Number of Elements]

The first expression is used to assign memory that will hold one single element of a data type. the second one is used to assign LEARN MORE>>


Address de-reference operator(&)

When we declare a varible, it must be stored in a concrete location in a succession of cells(the computer memory). We generally do not decide where the variable is to be placed. Fortunately, that is done automatically by the compiler and the operating system on runtime. But once the operating system has assigned an address to a variable we may sometimes be interested in knowing where it has been stored.
This can be done by preceding the variable identifier by the ampersand sign(&). which literally means                                 "address of " For example: - ptr = $a;
would assign the address of variable a to variable ptr. The ampersand refers to the address of a variable in memory and not its contents. LEARN MORE>>

Inheritance ....cont

What is inherited from the base class?
In principle every member of a base class is inherited by a derived class except:
         Constructor and destructor
Although the constructor and destructor of the base class are not inherited, the default constructor and the destructor of the base class are alwyas called when a new object of a derrived class is created and destrroyed.   LEARN MORE>>

Inheritance between Classes

An important feature of classes is inheritance. This allows us to create an object derived from another one, so that it may include some of the other's members plus its own. For example, we are going to suppose that we want to declare a series of classes that describe polygons like our CRectangle, or CTriangle. They have certain common features, such as both can be described by means of only two sides: height and base.
This could be represented in the world of classes with a class CPolygon from which we would derive the two referred ones: CRectanble and CTriangle ....LEARN MORE>>

Function Overloading

When several functions declarations are specified for a single function name in the same scope, the function name is said to be overloaded. C++ distinguishes functions having the same name by their number and tyoe if arguments.
A function name having several definitions that are differentiable by the number or types of their arguments is known as function overloading.
Overloading improves the readibility of a program by reducing namespace pollution. It makes the language extensible. It is used in inheritence and abstraction.


Whenever an object goes out of scope, it is destroyed. The memory used by that object is reclaimed. Just before the object is destroyed, an object's destructor is called to allow any clean-up to be performed.
A dectructor, as the name suggests, is used to destroy the objects that have been created by a constructor. Like a constructor, the destructor is a member function whose name is the same as the class name but is preceded by a tilde sign(~). For example, the destructor for the class number can be defined as shown below:
~number() { }
A destructor does not take any arguments; LEARN MORE>>


Parameterized Constructors
A default constructor initilizes the data mambers of all objects with the same set of values. However, in practice, it may be necessary to initialize the various data elements of different objects with different values when they are created. Often you will allow users of your classes to pass arguments to the constructor. This can be achieved by passing arguments to constructor functions when the objects are created. Constructors that can take arguments are called Parameterized Constructors
For example, the default constructor number() may be modified as given below: