Thread: Function Parameter causing syntax error

  1. #1
    Registered User
    Join Date
    Sep 2006

    Function Parameter causing syntax error

    When I try to compile my program, the compiler generates the following error:

    "In file included from avl_tree.h:6, from avl_tree.c:1: callbacks.h:13: error: syntax error before "Application"

    I have included all of the necessary files to compile, and I cannot figure out what the problem is. Any suggestions? Thanks.

    This is the line the compiler says is the problem:
    void draw_node( struct AvlNode* node , Application app)

  2. #2
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Portland, OR
    The most likely reason is that the declaration of AvlNode is not available at this line of code. Despite thinking that you're including everything, perhaps you are not. Slightly less likely is that Application is not available (but the fact that the error is occurring at the comma strongly suggests that it is the former, not the latter).

    To prove it one way or the other, try to define an AvlNode and an Application, right before this line of code:

    AvlNode test1;
    Application test2;
    And see which line causes an error.

  3. #3
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    struct AvlNode not just AvlNode
    They are 2 different things in C
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  3. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  4. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  5. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM