type void unexpected error

This is a discussion on type void unexpected error within the C Programming forums, part of the General Programming Boards category; This error message at the "void printpersontotal" function is making me insane (I guess I have been looking at this ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    9

    type void unexpected error

    This error message at the "void printpersontotal" function is making me insane (I guess I have been looking at this code too long)

    Please help!

    Thanks!

    (->) -marks where cursor is located when indicating error.

    I am including the function that calls the "void printpersontotal" function:

    void processdetail()
    {int pcontrol, dcontrol, scontrol;
    float ptotal = 0.0;
    float dtotal = 0.0;
    float stotal = 0.0;
    fread(&person, sizeof(person), 1, fileptr);
    pcontrol = person[i].pnumber;
    dcontrol = person[i].dnumber;
    scontrol = person[i].snumber;
    do
    {if(person[i].dnumber != dcontrol)
    {printpersontotal(&ptotal, &pcontrol, &dtotal);
    printdeparttotal(&dtotal, &dcontrol);
    }
    else
    if(person[i].pnumber != pcontrol)
    {printpersontotal(&ptotal, &pcontrol, &dtotal);
    printdetailline();
    ptotal += person[i].amount;
    }while (fread(&person, sizeof(person), 1, fileptr));
    printpersontotal(&ptotal, &pcontrol, &dtotal);
    printdeparttotal(&dtotal, &dcontrol);
    printstoretotal(&stotal, &scontrol);
    }

    (->) void printpersontotal(float *ptotal, int *pcontrol, float *dtotal)
    {fprintf(stream, "\n\r Person Total %5.2f \n\n\r," *ptotal);
    dtotal += ptotal;
    ptotal = 0;
    pcontrol = person[i].pnumber;
    linecount += 3;
    }

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    9
    Thanks I will try this.

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    9
    Thanks everyone, I got the program to compile but it still has some bugs. Salem, you are absolutely right. Formatting needs to be done more carefully.

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. How to monitor process creation?
    By markiz in forum Windows Programming
    Replies: 31
    Last Post: 03-17-2008, 03:39 PM
  3. file reading
    By gunghomiller in forum C++ Programming
    Replies: 9
    Last Post: 08-07-2007, 11:55 PM
  4. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 09:39 AM
  5. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 11:52 PM

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