1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

C/C++ Setvect question

Discussion in 'C++' started by su817200, Apr 30, 2010.

  1. su817200

    su817200 New Member

    Joined:
    Apr 30, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Dear Friend,
    I got the following build error while compiling the ->Could you please help

    void PC_VectSet (INT8U vect, void (*isr)(void))
    {
    setvect(vect, (void interrupt (*)(void))isr); /*Error in this line*/
    }

    error C2059: syntax error : ')'

    Rgds,
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    What happens if you don't cast it, i.e.:
    Code:
    setvect(vect, isr);
    
     

Share This Page