Error C2447: What is this?

This is a discussion on Error C2447: What is this? within the C++ Programming forums, part of the General Programming Boards category; I keep getting this error, rror C2447: missing function header (old-style formal list?) Error executing cl.exe. can somebody tell me ...

  1. #1
    Registered User hermit's Avatar
    Join Date
    Apr 2002
    Posts
    213

    Error C2447: What is this?

    I keep getting this error,

    rror C2447: missing function header (old-style formal list?)
    Error executing cl.exe.


    can somebody tell me what is this, i have provided the source code below. Thank you
    Attached Files Attached Files

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    I'm getting more:

    1. Use int main instead of void main.
    2. Remove the last ; in this code:

    Code:
    // Insert your CalculatePay function here 
    float CalculatePay ( // Calculate and return weekly pay
    int EmpType,
    int PayScale,
    int EmpNum,
    float HrsWorked,
    float Salary,
    int ContractType,
    float CashContractAmt,
    int CashContractPeriod);
    3. Remove the const declaration after the code mentioned above.

    Hmm, there are still more problems. It seems there is a { too much in your code.

  3. #3
    Registered User hermit's Avatar
    Join Date
    Apr 2002
    Posts
    213
    well it is a template that i have to follow from school,

    i just inserted the calculatepay function, but whatever i insert i still have this C2447 ERROR

    i have tried your method shiro, but nah still error, more errors infact . .

    Hope someone can help me please please please . .
    Last edited by hermit; 05-12-2002 at 09:31 AM.

  4. #4
    Registered User hermit's Avatar
    Join Date
    Apr 2002
    Posts
    213
    i even remove the ; from the void simplemindedclr(),
    so . .

    what else? i can seem to find any errors. dont know what to do now

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,499
    Your second 'prototype' should be a function

    watch the ; and the {

    Code:
    float CalculatePay ( // Calculate and return weekly pay
    int EmpType,
    int PayScale,
    int EmpNum,
    float HrsWorked,
    float Salary,
    int ContractType,
    float CashContractAmt,
    int CashContractPeriod);
    
    const float
    	BASE_PAY_ADMIN = 600.0, //$600/wk for WEEKLY_HRS_ADMIN
    	BASE_PAY_ENG = 1400.0, //$1400/wk for WEEKLY_HRS_ENG
    	WEEKLY_HRS_ADMIN = 40.0, //	40 hrs ordinary time paid
    	WEEKLY_HRS_ENG = 35.0, //35 hrs ordinary time paid
    	TIME_AND_HALF_ADMIN = 10.0, // next 10 hrs at time and a half
    	TIME_AND_HALF_ENG = 5.0; // next 5 hrs at time and a half
    {
    
    
    to
    
    
    float CalculatePay ( // Calculate and return weekly pay
    int EmpType,
    int PayScale,
    int EmpNum,
    float HrsWorked,
    float Salary,
    int ContractType,
    float CashContractAmt,
    int CashContractPeriod)   // ; gone
    {  // moved
    
    const float
    	BASE_PAY_ADMIN = 600.0, //$600/wk for WEEKLY_HRS_ADMIN
    	BASE_PAY_ENG = 1400.0, //$1400/wk for WEEKLY_HRS_ENG
    	WEEKLY_HRS_ADMIN = 40.0, //	40 hrs ordinary time paid
    	WEEKLY_HRS_ENG = 35.0, //35 hrs ordinary time paid
    	TIME_AND_HALF_ADMIN = 10.0, // next 10 hrs at time and a half
    	TIME_AND_HALF_ENG = 5.0; // next 5 hrs at time and a half

  6. #6
    Registered User hermit's Avatar
    Join Date
    Apr 2002
    Posts
    213

    Thumbs up

    nope still dont work,

    what exactly is this error c2447?? can someone tell me, i try to fix all the problems u all told me, but still wont work

  7. #7
    Registered User hermit's Avatar
    Join Date
    Apr 2002
    Posts
    213

    fixed ,

    dont worry about it. its fixed !
    my nick says it all, my social life went down the drain

    but exams are near, got to prepare myself thanks to those that help .

Popular pages Recent additions subscribe to a feed

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