Function Parameter causing syntax error

This is a discussion on Function Parameter causing syntax error within the C Programming forums, part of the General Programming Boards category; 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: ...

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    55

    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:
    Code:
    void draw_node( struct AvlNode* node , Application app)

  2. #2
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,354
    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:

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

  3. #3
    "I Win!" by U. Lose vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,754
    struct AvlNode not just AvlNode
    They are 2 different things in C
    To be or not to be == true

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, 02:07 AM
  2. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 03: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21