Another Beginner Error Question

so your saying cut out the "int" in that line and just have that line "buttons[0] = 2"?
I just tried that and here is the error I got:

keyboard:2: error: 'buttons' does not name a type
buttons[0] = 2;
^
exit status 1
'buttons' does not name a type