Early Binding Time


/*****************************

Example of a Variable Bound at 
Compile-Time in C++

*******************************/

#include < iostream.h >

#define NUMBER 12;

void main()
{

    int Number = NUMBER;
    cout << "Number\n" << NUMBER << endl;  

}

/*******************************

Example of a Variable Bound at 
Compile-Time in C

********************************/

const int STRING_LENGTH  = 20;

main()
{
    char String [STRING_LENGTH];
    return 0;
}

These pages were edited for style and content by Allan Caine, Laura Drever, Gorana Jankovic, Megan King, and Marie Lewis.
The original authors of these pages were Graeme Humphries, Chantal Laplante, Chris Mills, and Melvin Lenz.

Last Modified: Wednesday, June 7th 23:45:30
Copyright 2000 Department of Computer Science, University of Regina.


[CS Dept Home Page]