HWND hwnd [1]; says something about paramaters

So I have this in my code HWND hwnd [1]; and I get an error message:

error: declaration of 'HWND__*hwnd[1]' shows a parameter.

Any way to fix this?
Are you sure that it does not say 'shadows' a parameter?
Last edited on
Edit: NVM, I feel stupid now, I got it lol
Last edited on
This is an error:

1
2
3
4
5
6
void SomeFunc(int someInt) //formal parameter called someInt
{
    int someInt = 4; //also a local  variable called someInt
    
    cout << someInt << endl;
}


This one is not an error - compiler may or may not give a warning
1
2
3
4
5
6
7
8
9
10
11
12
13
class AClass
{
    int x; //class variable called x

    void ClassFunction(int x) //class member function with parameter called x
    {
        
        //which x will get used here (parameter or member variable)
        //answer - the function parameter will get changed
        x = 3;
    }

};
Topic archived. No new replies allowed.