C++ examples for Function:Global Variable
Define two global variables, g and h.
#include <iostream> using namespace std; int g, h; // Global because they're defined before a function. int main()//from w w w .jav a 2 s. co m { // int main()'s code goes here. }