While trying to get back into programming, I come across problems. The first one is:

Why can't I work with global variables? Is there a new way of doing the same thing?


To be a little more specific: I get this error message

error: 'global' does not name a type

Sorry :P Here it is

#include <iostream.h>
#include <stdlib.h>

using namespace std;

global int Test;

int main()
    Test = 5;
    cout << "Test contains: " << Test;
    return 0;

Try taking out the word global. For reference see here and here.