static variables

Of course you could use a global variable as well.