error using 'pinMode(x,OUTPUT)

TOTAL newbie to world of Arduino, but not new at programming!

Very small portion of program for a DDS project! The 'pinMode(x,y) lines all cause same error:

sketch_sep26a.ino:17:8: error: expected constructor, destructor, or type conversion before '(' token

in all 4 'pinmode' lines (17-20), regardless of what other program tricks I try (commented versions):

1 // 2 #define DATA 0 3 #define RESET 1 4 #define CLOCK 2 5 #define LOAD 3 6 // 7 //int DATA = 0; 8 //int RESET = 1; 9 //int CLOCK = 2; 10 //int LOAD = 3; 11 // 12 //pinMode(DATA, OUTPUT); 13 //pinMode(RESET, OUTPUT); 14 //pinMode(CLOCK, OUTPUT); 15 //pinMode(LOAD, OUTPUT); 16 // 17 pinMode(0, OUTPUT); 18 pinMode(1, OUTPUT); 19 pinMode(2, OUTPUT); 20 pinMode(3, OUTPUT); //

OK, now point out my stupid mistake, please! AND, thanks in advance....

17-20 should be in the setup() function.

void setup() { pinMode(0, OUTPUT); pinMode(1, OUTPUT); pinMode(2, OUTPUT); pinMode(3, OUTPUT); }

A proper Arduino sketch requires the setup() and loop() functions, even if they are empty. The following compiles with IDE version 1.04. I had to get rid of the line numbers for my IDE. The latest version of the IDE has line numbering. There are lots of examples of how to write Arduino sketches included with all versions of the IDE. Look in the File menu, pinMode settings usually go in the setup() function.

#define DATA 0
  #define RESET 1
  #define CLOCK 2
  #define LOAD 3
  //int DATA = 0;
  //int RESET = 1;
  //int CLOCK = 2;
 //int LOAD = 3;

void setup()
 //pinMode(DATA, OUTPUT);
 //pinMode(RESET, OUTPUT);
 //pinMode(CLOCK, OUTPUT);
 //pinMode(LOAD, OUTPUT);

 pinMode(0, OUTPUT);  
 pinMode(1, OUTPUT);  
 pinMode(2, OUTPUT);
 pinMode(3, OUTPUT);

 void loop()

Thank you, both! It was indeed the location(s) having to be in the 'setup' portion! As an aside, it did compile without the setup and loop portions included, I was trying to simplify the explanation of the problem.