project 02 learning the code

after compiling the program for project 02 (p.34-39) i get the following error message:Arduino: 1.6.4 (Windows 8.1), Board:"Arduino Uno"

sketch_may31a:12: error: expected constructor, destructor, or type conversion before '(' token

the program text is exactly copied ( without the sentence numbers )

pinMode(2,INPUT); is the first sentence that is highlighted after compiling.

can someone explain what might be the cause?

i have been searching for similar problems but that gave no result

Jacob

Post your code. Use code tags.

You're likely missing, or have extra, one of these before that line: , ; ( ) { } Make sure every ( and { has a mating ) and } in the correct place.

Lots of people do not have your code.

Please attach your sketch when asking for help.