Thread: Puzzled

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    35

    Puzzled

    The below code to me looks right but I am getting errors, and warnings one of which says that orderRecs is not declared.

    Any reason why?

    Thanks



    [code]

    //defininition
    int initializeOrderRec(struct ORDER_INFO orderRecs[LIMIT_SIZE],
    int *pageNo, FILE * orderFilePtr, FILE *processFilePtr);


    initializeOrderRec(orderRecs, &page, orderFilePtr, processFilePtr);
    [\code]
    Imagination at Work

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    initializeOrderRec(orderRecs, &page, orderFilePtr, processFilePtr);


    This means you're missing something like:

    struct mystruct orderRecs;

    Create an instance of the variable before trying to use it.

    Quzah.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    35

    I have declared it

    This should take care of the error "orderRecs not declared"



    [code]

    struct ORDER_INFO orderRecs[LIMIT_SIZE];

    [\code]
    Imagination at Work

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Yup.

    For future refrence, use the / instead of the \ for your final closing CODE.


    Quzah.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Puzzled.
    By silhoutte75 in forum C Programming
    Replies: 13
    Last Post: 01-21-2008, 05:17 PM
  2. Replies: 4
    Last Post: 07-15-2005, 04:10 PM
  3. Puzzled
    By fkheng in forum C Programming
    Replies: 5
    Last Post: 06-22-2003, 09:56 PM
  4. Still puzzled [I hope this formatted]
    By sketchit in forum C Programming
    Replies: 2
    Last Post: 09-28-2001, 12:26 AM
  5. Still puzzled
    By sketchit in forum C Programming
    Replies: 1
    Last Post: 09-27-2001, 05:09 PM