Whats am i doing wrong it is not compile


Write a C++ program that creates customers’ bills for a carpet company when the following information is given:

a.The length and the width of the carpet in feet.
b.The carpet price per square foot.
c.The percent of discount for each customer.

The labor cost is fixed at $0.35 per square foot. It is to be defined as a constant. The tax
rate is 8.5% applied after the discount. It is to be defined as a constant.

#include namestd;
 
#define     LABOR .35
#define     TAX         .085
 
// Function Declarations
      void  getData           (int* a, int* b, float* disc, float* cost);
      float calcvalues  (int area, float instprice, float sub, float tot);
      float instlprice  (float* instlprice);
      float sub               (float* sub);
 
int main(void)
{
//Local Declarations      
 
//Statements     
 
 
      return 0;
} //main
 
 
float calcvalues (float* instlprice, float* sub, float* tot)
{
     
      instlprice (&instlprice);
      sub               (&sub);
  
      return 0;
} 
 
float instlprice  (float instlprice)
{

      int a;
      int b;
      float disc;
      float cost;
      int area;
      float labcost;
      float carprice;
 
           
      //Statements
      getData (&a, &b, & disc, &cost);
 
      area = a * b;
      carprice = area * cost;
      labcost = area * LABOR;
      instlprice = carprice + labcost;
 
      return instlprice;
} //instprice
 

      
*/
 
void getData (int* a, int* b, float* disc, float* cost)
{
      cout>>("Please enter the length, width, discount and cost: ", a, b, disc, cost);
     cin<< ("%d %d %f %f", a, b, disc, cost);
 
      return;
} 

*/
 
float sub (float sub)
{

      float disc;
      float instlprice;
      int a;
      int b;
      float cost;

      getData (&a, &b, &disc, &cost);

      instlprice (&instlprice);
 
      sub = disc * instlprice;
 
      return sub;
}

>>Whats am i doing wrong it is not compile
Errors ??? compiler ? operating system ?

I'm using Dev-C++ and xp home for operating system.

You didn't answer all my questions.

thanks ancient dragon for fixing my tags. How do put tags on my threads anyway. Please tell me thanks.

Did you read you PM that I sent you? Here's how to add the code tags

[code=cplusplus] // put your code here

[/code]

Here are the errors how do I correct them.
In function `float calcvalues(float*, float*, float*)':
34error: `instlprice' cannot be used as a function
35: error: `sub' cannot be used as a function
: At global scope:
70: error: expected unqualified-id before '/' token
70: error: expected constructor, destructor, or type conversion before '/' token
70:error: expected `,' or `;' before '/' token
81: error: expected unqualified-id before '/' token
81: error: expected constructor, destructor, or type conversion before '/' token
81: error: expected `,' or `;' before '/' token

Thank you I put the code tags before the code and at the very end.

line 1: there is no such include file. Just delete that line

line 26: wrong number of parameters. See that function's prototype on line 9.

lines 23 and 27 and 69: sub is declared as a function on line 10. You can't use the same name as a parameter.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.