We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried the following and it works, but m should not be in scope
#include using namespace std;
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? }
The text was updated successfully, but these errors were encountered:
felixhao28
No branches or pull requests
I tried the following and it works, but m should not be in scope
#include
using namespace std;
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?
}
The text was updated successfully, but these errors were encountered: