assignment help needed totally frustrated please help!

  • From: "Marvin Hunkin" <startrekcafe@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Thu, 13 Aug 2009 11:23:21 +1000

    hi.
tried to take bills advice.
but getting this weird error.
well if you have some sight.
will post the image below with the error.
saying not liking the void result but changed it to a float.
and collect 2 and exit or something in the command prompt.
can any one help me out.
using windows vista and g++ compiler.
tried to do a shutdown and restart.
and using jaws but no good.
can any one help me to try to compile this application.
this is giving me a migrain.
cheers Marvin.



and please be gentle with me.
am i allowed to add atatchments to this group or not.
cannot remember.
please be gentle and help me out to try to get this to compile.
tried the g in front of the variable names for global variables.
but gave me errors saying un declared variables.
so just put them without the g key word.
but did use the l character in front of the local variable.
please help me out.
this is giving me a migrain.
cheers Marvin.

/*
 Program: Cash.
 File:  Cash.cpp
 Description: Cash Register Program..
 Author:  Marvin Hunkin.
 Revision: 1.00 11/08/2009 First release.
*/

// iostream is needed for the cout statement.
#include <iostream>
using namespace std;

//Declare Functions
void input();
   float result();

//Declare Variables
   //This variable will hold the item cost.
   float itemCost = 0.0;
   //This variable will hold the number of items being purchased.
   int itemNumber;
   //This variable will hold the total amount of items purchased.
   float total;
   //this variable will hold the sales tax.
   float salesTax = 0.1;
 //this variable will hold the counter.
 int counter;

int main()
{

 // Call functions
 input();
 result(float itemCost, int itemNumber, float salesTax);
 } //close main function

//Input Function goes here.
void input()
{
  cout << "Welcome To Marvin's Cash Register Program.\n";
 cout << "Instructions:\n";
 cout << "You enter the cost of the item from the keyboard.\n";
 cout << "You enter the number of items purchased from the keyboard.\n";
cout << "The program will display a grand total of items purchased.\n";
for (int counter = 0; counter <=6; counter++)
{
cout << "Enter a item price and then press enter.\n";
cin>> itemCost;
cout << "Enter a item number and then press enter.\n";
cin>> itemNumber;
} //close for loop
} //close input() function

//  Result function goes here.

 float result(float itemCost, int itemNumber, float salesTax)
{
 //Declare local variables.
float ltotal = 0.0;

//If block goes here.
if (itemCost>=10)
{
 ltotal -=  salesTax * ltotal;
    } //close if block

//Grand total goes here.

ltotal = itemNumber * itemCost;
cout << " Total $ " << result() << endl;
return ltotal;
} //close total() function
E-Mail: startrekcafe@xxxxxxxxx
 Msn: startrekcafe@xxxxxxx
 Skype: startrekcafe
Visit my Jaws Australia Group at http://groups.yahoo.com/groups/JawsOz/


E-Mail: startrekcafe@xxxxxxxxx
 Msn: startrekcafe@xxxxxxx
 Skype: startrekcafe
Visit my Jaws Australia Group at http://groups.yahoo.com/groups/JawsOz/



__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts:

  • » assignment help needed totally frustrated please help! - Marvin Hunkin