Computer Science Canada

Call a Global Variable?

Author:  rar [ Wed Nov 25, 2009 6:22 pm ]
Post subject:  Call a Global Variable?

I know it's unnecessary, but can you call a global variable as a function parameter?

Example:
code:


void Function(int);
int x;

void main()
{
Function(x);
//program
}

void Function(int y)
{
//function definition using y;
}

Author:  wtd [ Thu Nov 26, 2009 1:14 am ]
Post subject:  RE:Call a Global Variable?

Of course you can.


: