Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C Masked Global Variable

Name: Anonymous 2009-05-14 5:52

How would I access the global variable tim from procedure()?

int tim = 0;

void procedure(int tim)
{
    global tim = local tim;
}

Name: Anonymous 2009-05-14 7:03

But how would i access the global variable tim from inside procedure?

e.g. in a C++ class, it would be like this:

class Jobby{
    int tim = 0;
   
    public void procedure(int tim)
    {
        this.tim = tim;
        // global = local
    }
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List