Question: In my form i have about 36 buttons and for each i have the following code

```
        button3.BackColor = Color.DarkGreen;
        button_click("A1");
        button3.Enabled = false;
        nr_l++;
        textBox4.Text = Convert.ToString(nr_l);

```

which means I will have this code x 36 times, I want to make a method that does this but I dont know how to change last clicked buttons properties, i want something like this :

```
    private void change_properties()
    {
    last_clicked_button.backcolor = color.darkgreen;
    button_click("A3"); //this is a method for adding A3 to a string,   
    last_clicked_button.enabled = false;
    nr_l++;
    textbox4.text = convert.tostring(nr_l);
    }

    private void button3_Click(object sender, EventArgs e)
    {
    change_properties();
    }

```

How can i tell change\_properties method that it should work with button3 in case it was clicked?

Answer: 
You're correct, `a.f()` is not a constant expression. And variable length arrays are not allowed by the c++ standard. The GNU compiler, however, supports them as a [language extension](https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html). You can ask the compiler to give you a warning when you use non-standard extensions with the [`-pedantic` option](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html), or an error with `-pedantic-errors`.

Edit: Apparently, GCC 4.9 [added](https://gcc.gnu.org/gcc-4.9/changes.html#cxx) the official support for [N3639](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3639.html), the proposal to add variable length arrays to the C++14 standard. In the end, the proposal was not included in the standard, but GCC 4.9 was released before C++14, so that change was not reflected. So, VLA's are supported by GCC 4.9 on purpose in C++14 mode and the above options don't disable them. Note that the C++14 mode is still experimental (even in GCC 5).
The following non-standard code

```
int x = std::rand();
int r[x] = { 1,2,3 };

```

compiles under g++, not because `g++` mistakenly treats `std::rand()` as a constant expression, but because it implements VLAs by default. Use `-pedantic` or `-Wvla` to warn about them, `-Werror=vla` to turn these warnings into errors.