Error code I do not understand

09 Jan 2011

Hello.  When I compile the code below  I get the following  error

"Explicit type is missing ("int" assumed) (E260-D)" in file "/main.cpp"

Any ideas to put me on the right track?

Here is the code. 

//******************************************************************************
Write_Command(unsigned char command){
        nRD = 1;
  DB = command;
        RS = 0;
        nWR  = 0;
  CS = 0;
  CS = 1;
        nWR  = 1;
       
}
//;******************************************************************************

09 Jan 2011

You haven't supplied a return type. Try:-

void Write_Command(unsigned char command){
    nRD = 1;
    DB = command;
    RS = 0;
    nWR  = 0;
    CS = 0;
    CS = 1;
    nWR  = 1;   
}

Notice the void which says "this function returns no value". Without a return type specifier the compiler will automatically assume int.

09 Jan 2011

How about this:

void Write_Command(unsigned char command)

{

}

09 Jan 2011

thanks guys - let me try  your  suggestions

09 Jan 2011

I worked - thanks