main to function question
How would I import the variables from main to a function without passing it to the function? In the example my teacher gave me, he only passed 3 items to the function, but used variables from the main in the function without passing it and did not declare them in the function. How is this possible?
very rough example:
void example(stuff, stuff2, stuff3)
hello = stuff;
int stuff, stuff2, stuff3;
hello = blah;
example(stuff, stuff2, stuff3);