/***************************************************************************
 *  Columbia University Introduction to Computer Programming in C COMS 1003
 *  Program to Show You Cannot Change a Const
 *
 *  Copyright (C) 2005 Michael E. Locasto
 *
 *  All rights reserved.
 *
 * $Id: consttest.c,v 1.1 2005/09/18 23:15:44 locasto Exp $
 **************************************************************************/

/**
 * This program simply declares and tries to change the value of a const
 * Warning: this program WILL NOT compile! It will produce output like the
 * following when run through gcc:
[michael@xoren code]$ make consttest
gcc -Wall -g -o consttest consttest.c
consttest.c: In function `main':
consttest.c:23: error: assignment of read-only variable `HARD_VALUE'
make: *** [consttest] Error 1
[michael@xoren code]$ 
 * 
 */
int main(int argc, char* argv[])
{
   /* declare a constant variable and initialize it. */
   const int HARD_VALUE = 3;

   /* Now try to change it. */
   HARD_VALUE = 5;

   /* book keeping */
   return 0;
}
