JSCPP
JSCPP copied to clipboard
Scope
I tried the following and it works, but m should not be in scope
#include
int g=1;
int main() { int m = 2; cout << "scope test" << endl; func1(); return 0; }
void func1(){ int f1 = 10; cout << g << endl; cout << f1 << endl; cout << m << endl; //should not be in scope but is? }