Help with an error: undefined reference

I keep getting the same error:
|In function `main':|
65|undefined reference to `calccost(int, float, float)'|

but i have used the same variables and nothing has changed
here is the code i am using

// Declare variables
int numpieces;
string customer, characters;
int custnum, prevcustnum;
char boardtype;
int inches1, inches2, feet;
float price, cost, subtotal,boardfeet;
string endloop="no";
string wood;

// Prototypes
void header(int);
float calcboardfeet(int,int,int);
float calcprice(char);
float calccost(int numpieces,float price,float boardfeet);
void reportbody(int,int,int,int,string,float);
string woodtype(char);

// Read in board type
infile >> boardtype;

if(boardtype!='T')
{
infile >> numpieces >> inches1 >> inches2 >> feet; // read in remaining customer data

boardfeet=calcboardfeet(inches1,inches2,feet);
price=calcprice(boardtype);
cost=calccost(numpieces,price,boardfeet);
wood=woodtype(boardtype);
subtotal=subtotal+cost; // accumulate costs
reportbody(numpieces,inches1,inches2,feet,wood,cost); // call function to display report body

}
That error indicates you have not implemented a function named calccost with arguments of (int, float, float) (or if you have, the function you implemented has different arguments from your function prototype).

Since you haven't included your code for calccost, it's hard to say which it is.

PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post.
http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.
Topic archived. No new replies allowed.