sdcc, problem with function pointers

Discussion in 'Embedded Systems and Microcontrollers' started by timok, Dec 8, 2009.

  1. timok

    Thread Starter New Member

    Dec 8, 2009
    1
    0
    Hi,
    I'm trying to succeed in a function pointer.
    what is wrong with the sdcc compiler says:
    syntax error: token -> 'code' ; column 18

    #include <string.h>
    char str1[10];
    xdata unsigned int i;
    xdata unsigned int ret;
    code *call;
    typedef void (code *callback); (void); // syntax error: token -> 'code'
    extern callback xdata statefunc;
    void main(void)
    {
    strcpy(str1, "testing");
    }
     
    Last edited: Dec 8, 2009
  2. Louise

    New Member

    Jan 17, 2010
    13
    1
Loading...