C++ errors help

Hey everyone,

I could really use some advice. I am creating a pizza program for ordering a pizza and I have removed all the errors except for two. I have tried everything I can think of to fix this problem so it will compile, but to no avail. The only errors left are:

1>------ Rebuild All started: Project: Pizza Order App Midterm, Configuration: Debug Win32 ------
1> stdafx.cpp
1> Pizza Order Midterm.cpp
1> Pizza Order App Midterm.cpp
1>c:\users\india-n-jerry\documents\visual studio 2010\projects\pizza order app midterm\pizza order app midterm\pizza order app midterm.cpp(57): warning C4390: ';' : empty controlled statement found; is this the intent?
1> Generating Code...
1>Pizza Order App Midterm.obj : error LNK2019: unresolved external symbol "bool __cdecl moreOrders(void)" (?moreOrders@@YA_NXZ) referenced in function _main
1>C:\Users\India-n-Jerry\Documents\Visual Studio 2010\Projects\Pizza Order App Midterm\Debug\Pizza Order App Midterm.exe : fatal error LNK1120: 1 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


Any help would be appreciated. Thank you for your time. The entire code is listed below seperated into 1 header and 2 cpp files.

CODE.Starts below...:

// OrderPizzaApp.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "Pizza_Order.h"
#include <iostream>
#include <string>
using namespace std;

// prototypes
Pizza_Order createPizza_Order(); ///////////////////////
bool moreOrders (); //////////////////////////
bool morePizza_Order (); //////////////////////////
void displayPizza_Order(Pizza_Order Pizzas[]); ////
const int Max_Pizza_Order = 3; /////////////////////

void main() // Declare local variables

{

// local
string input = "";
int pizza_OrderCount = 0; ////////////////////// same
bool anotherPizza_Order = false, anotherOrder = false;
Pizza_Order thisPizza_Order;
Pizza_Order Pizza_Orders[Max_Pizza_Order]; //////// or Pizza_Order thisPizza; redo





do // LOOP

{
do
{
Pizza_Orders[pizza_OrderCount] = createPizza_Order();
pizza_OrderCount++;

if (pizza_OrderCount < Max_Pizza_Order)
anotherPizza_Order = morePizza_Order ();

else
{
cout << "You have reached the max amount of " << Max_Pizza_Order << " Pizzas! \n\n\n\n";

anotherPizza_Order = false;
}


}while(anotherPizza_Order);
anotherPizza_Order = moreOrders();
}while(anotherOrder);
}
///////////////////////////////////////////

Pizza_Order createPizza_Order()
{

Pizza_Order thisPizza_Order;
string input = "";
bool anotherExtraToppings = false;

for (int attribute = 0; attribute < 5; attribute++)
{
switch(attribute)
{
case 0: cout <<" Pizza Type: ";
cin.ignore(cin.rdbuf() -> in_avail());
getline(cin, input);
thisPizza_Order.setPizzaType(input);
break;

case 1: cout << " Pizza Size: ";
cin.ignore(cin.rdbuf() -> in_avail ());
getline(cin, input);
thisPizza_Order.setSize(input);
break;


case 2: cout <<" cut: ";
cin.ignore(cin.rdbuf() -> in_avail());
getline(cin, input);
thisPizza_Order.setCut(input);
break;

case 3: do
{
cout <<" Extras: ";
cin.ignore(cin.rdbuf() -> in_avail ());
getline(cin, input);
thisPizza_Order.setExtraToppings(input);

}while(anotherExtraToppings);//
break;



case 4: cout <<" Service: ";
cin.ignore(cin.rdbuf() ->in_avail ());
getline (cin, input);
thisPizza_Order.setService(input);
break;


}
}
return thisPizza_Order;
}




void displayPizzas_Order(Pizza_Order Pizza_Orders[])
{

}

bool morePizzas()
{
string answer = "";
cout << "Are you done ordering Pizzas? (y/n): ";
cin >> answer;
cout << endl << endl;
return (answer[0] != 'n' && (answer[0] != 'N'));
}

bool moreOrders()
{
string answer = "";
cout << " Do you wish to order another pizza? (y/n): ";
cin >> answer;
cout << endl << endl;
return (answer[0] != 'n' && (answer[0] != 'N'));
}



////////////// end of main cpp
//////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Pizza_Order.h"
#include <iostream>
#include <string>
#include <sstream>
using namespace std;


//int *Num_toppings = &num_toppings;

// initialize attributes to empty string with set("")
Pizza_Order::Pizza_Order()
{




setSpecialcut("");// camel case, cap the first and each additional word

////////////////////////////////////setTopping("");// replaced Large
setSize("");
setService("");
setCut("");
setExtraToppings("");
setPizzaType("");
////////////////////////////////////
}


Pizza_Order::Pizza_Order(string pt, string et, string sc, string sz, string ser, string ct)
{

extraToppings = et;
size = sz;
service = ser;
cut = ct;
pizzaType = pt;

}

Pizza_Order::~Pizza_Order() {}// destroyer, destorys an instance of this class



// setters and getters for all attributes// camel case caps needed


void Pizza_Order::setExtraToppings(string et)
{
extraToppings = et;
}
string Pizza_Order::getExtraToppings()
{
return extraToppings;
}

/////////////////////////////////////

void Pizza_Order::setSize(string sz)
{
size = sz;
}
string Pizza_Order::getSize()
{
return size;
}


////////////////////////////////////
void Pizza_Order::setService(string ser)
{
service = ser;
}
string Pizza_Order::getService()
{
return service;
}


/////////////////////////////////////
void Pizza_Order::setCut(string ct)
{
cut = ct;
}
string Pizza_Order::getCut()
{
return cut;
}
/////////////////////////////////////

void Pizza_Order::setPizzaType(string pt)
{
pizzaType = pt; // type
}
string Pizza_Order::getPizzaType()
{
return pizzaType;
}

/////////////////////////

void Pizza_Order::setSpecialcut(string sc)
{
specialcut = sc;
}
string Pizza_Order::getSpecialcut()
{
return specialcut;
}


///////////////////////////
string Pizza_Order::displayAttributes()
{

string thisPizza_Order = "\n\n Your order is a " + getPizzaType(); " pizza " + getSize(); " in size, with " + getExtraToppings();
" toppings, cut in " + getCut() + "pieces, for " + getService() + "\n\n\n";

// clean up code

return thisPizza_Order;
}


///////////////// end of Pizza Order.cpp
///////////////////////////////////////////////////////////////////



// Pizza_Order.h : Defines the entry point for the console application.

//#include "stdafx.h"
#include <string>
#include <iostream>
#include <sstream>
using namespace std;



class Pizza_Order // class
{
private:

//must have setters and getters to access private attributes
static const int NUM_OF_ATTRIBUTES = 6;// is this right??????// had to remove const before string,

////////////////////////////////////////////////
string size;// have a default for 8 piece cut
string service;
string cut;
string extraToppings;
string pizzaType;
////////////////////////////////////////////////
string specialcut;



public:

Pizza_Order(); // same name as class // initialize attributes to empty string


Pizza_Order(string, string, string, string, string, string);


~Pizza_Order(); // destructor

//PizzaOrder setters and getters for all attributes. Put in the .h section// Size, Service, Cut, Cheese, Olives,
// what about const string sml etc? const string med? const string lge?

void Pizza_Order::setSize(string); // capital first letter (8 of them)
string Pizza_Order::getSize();

void Pizza_Order::setExtraToppings(string); // capital first letter (8 of them)
string Pizza_Order::getExtraToppings();


void Pizza_Order::setService(string);
string Pizza_Order::getService();


void Pizza_Order::setCut(string);
string Pizza_Order::getCut();

void Pizza_Order::setPizzaType(string); // type
string Pizza_Order::getPizzaType();




/////////////////////////////////////////////////////////////////////////

void Pizza_Order::setSpecialcut(string);
string Pizza_Order::getSpecialcut();

void Pizza_Order::setTopping(string);
string Pizza_Order::GetTopping();

string Pizza_Order::displayAttributes(); // or string::displayAttributes(); // set and get stops here//




};








What is around line 57 of "pizza order app midterm.cpp"?
I don't know. when i clicked on the error, it wont take me to a specific line like it usually does.
<Bold and Beautiful static stare> Are you saying that clicking a mouse button is the only way to find certain line from certain file?
usually clicking on the error will take me to the offending code, or the error says a line number it is referring to in the code.
All i am getting is :

1>Pizza Order App Midterm.obj : error LNK2019: unresolved external symbol "bool __cdecl morePizza_Order(void)" (?morePizza_Order@@YA_NXZ) referenced in function _main.

something about referrenced in function main.
I got the above error to go away. I had a reference wrong.
Topic archived. No new replies allowed.