#include <iostream>
#include <string>
 
using namespace std;
 
int foo(int y) {
    int x = 3;
    return y*x;
}
 
 
int main()
{
    int x = 4;
    cout << "here is an x: " << x << endl;
    {
        int y = 5;
        {
            int x = y;
            cout << "here is another x: " << x << endl;
        }
        int x = 6;
        cout << "WHY ON EARTH WOULD YOU DO THIS??" << foo(x) << endl;
    }
 
    char ch;
    cin >> ch;
    return 0;
}
cs-142/scope.txt · Last modified: 2015/10/13 00:14 by kseppi
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0