Thread: Help !!!

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    1

    Unhappy Help !!!

    Hello
    I"m trying to write a program for my uni assignment but I got this error during compiling and I have no idea wat it means, could somebody help me
    Here's the error

    too few arguments to function `void CalculateAverage(int &, double &, double &, int &)'

    this is the code that cause the error

    void CalculateAverage(int& Score, double& sAverage, double& cAverage, int& NoOfStudent);

    Basically, I"m trying to open a file read a bunch of test score and calculate the average for the test score, i've decided to use a function to do this but I got lost on the way and have no idea what the error means.

  2. #2
    Registered User ventolin's Avatar
    Join Date
    Jan 2004
    Posts
    92
    sounds like you have called it with few too arguments, post the whole code if its small so i can check it over
    Last edited by ventolin; 05-12-2004 at 03:16 AM.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > oid CalculateAverage(int& Score, double& sAverage, double& cAverage, int& NoOfStudent);
    Looks like another attempt to prototype the function rather than call it

    Try
    Code:
    CalculateAverage(Score, sAverage, cAverage, NoOfStudent);
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed