Variables can be declared everywhere inside the code without using hooks


By using the following example in C++ you can declare variables verywhere inside the code without using hooks.

#include <iostream.h>

void main ()
{
double a;

cout << "Hello, this is a test program." << endl;

cout << "Type parameter a: ";
cin >> a;

a = (a + 1) / 2;

double c;

c = a * 5 + 1;

cout << "c contains &nbsp;: " << c << endl;

int i, j;

i = 0;
j = i + 1;

cout << "j contains &nbsp;: " << j << endl;
}




Added on June 26, 2007 Comment
}