PDA

View Full Version : static globals...



DavidP
02-19-2002, 09:38 PM
whats the point of declaring a global variable static?

ex:

#include <iostream.h.

static int x;

int main (void ){...}

doubleanti
02-19-2002, 11:28 PM
it limits the scope of that variable to the source file it was declared in.