I am getting the following errors and can't figure out how to fix it:
Start Error Message:
1>------ Build started: Project: Essential, Configuration: Debug Win32 ------
1>Compiling...
1>Essential.cpp
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(9) : error C2659: '=' : function as left operand
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(10) : error C2659: '=' : function as left operand
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(11) : error C2659: '=' : function as left operand
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(12) : error C2659: '=' : function as left operand
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(13) : error C2659: '=' : function as left operand
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(20) : error C2659: '=' : function as left operand
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(21) : error C2659: '=' : function as left operand
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(22) : error C2659: '=' : function as left operand
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(23) : error C2659: '=' : function as left operand
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(24) : error C2659: '=' : function as left operand
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(25) : error C2659: '=' : function as left operand
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(32) : error C2556: 'int &Essential::GetProductID(void) const' : overloaded function differs only by return type from 'int Essential::GetProductID(void) const'
1> c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.h(24) : see declaration of 'Essential::GetProductID'
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(32) : error C2040: 'Essential::GetProductID' : 'int &(void) const' differs in levels of indirection from 'int (void) const'
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(37) : error C2556: 'int &Essential::GetManufacturersID(void) const' : overloaded function differs only by return type from 'int Essential::GetManufacturersID(void) const'
1> c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.h(25) : see declaration of 'Essential::GetManufacturersID'
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(37) : error C2040: 'Essential::GetManufacturersID' : 'int &(void) const' differs in levels of indirection from 'int (void) const'
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(42) : error C2556: 'int &Essential::GetQuantityOfProduct(void) const' : overloaded function differs only by return type from 'int Essential::GetQuantityOfProduct(void) const'
1> c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.h(26) : see declaration of 'Essential::GetQuantityOfProduct'
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(42) : error C2040: 'Essential::GetQuantityOfProduct' : 'int &(void) const' differs in levels of indirection from 'int (void) const'
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(47) : error C2556: 'double &Essential::GetWholeSalePrice(void) const' : overloaded function differs only by return type from 'double Essential::GetWholeSalePrice(void) const'
1> c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.h(27) : see declaration of 'Essential::GetWholeSalePrice'
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(47) : error C2040: 'Essential::GetWholeSalePrice' : 'double &(void) const' differs in levels of indirection from 'double (void) const'
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(52) : error C2556: 'double &Essential::GetMarkUpPercentage(void) const' : overloaded function differs only by return type from 'double Essential::GetMarkUpPercentage(void) const'
1> c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.h(28) : see declaration of 'Essential::GetMarkUpPercentage'
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(52) : error C2040: 'Essential::GetMarkUpPercentage' : 'double &(void) const' differs in levels of indirection from 'double (void) const'
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(58) : error C2440: 'return' : cannot convert from 'char *[30]' to 'char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(67) : error C2264: 'Essential::GetProductID' : error in function definition or declaration; function not called
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(68) : error C2264: 'Essential::GetManufacturersID' : error in function definition or declaration; function not called
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(69) : error C2264: 'Essential::GetQuantityOfProduct' : error in function definition or declaration; function not called
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(70) : error C2264: 'Essential::GetWholeSalePrice' : error in function definition or declaration; function not called
1>c:\users\youlanda\desktop\lan\odu\spring 2011\it 310\program 1 store inventory\essential\essential.cpp(71) : error C2264: 'Essential::GetMarkUpPercentage' : error in function definition or declaration; function not called
1>EssentialClientCode.cpp
1>Generating Code...
End of Error Message:
Beginning of Source Code:
// Implementation File (Essential.cpp)
#include "Essential.h"
// Constructors
Essential::Essential()
{
ProductID = 0;
ManufacturersID = 0;
QuantityOfProduct = 0;
WholeSalePrice = 0;
MarkUpPercentage = 0;
ProductDescription[30] = '\0';
}
Essential::Essential(int InitProductID, int InitManufacturersID, int InitQuantityOfProduct,
double InitWholeSalePrice, double InitMarkUpPercentage, char InitProductDescription[])
{
ProductID = InitProductID;
ManufacturersID = InitManufacturersID;
QuantityOfProduct = InitQuantityOfProduct;
WholeSalePrice = InitWholeSalePrice;
MarkUpPercentage = InitMarkUpPercentage;
strcpy_s= (ProductDescription, InitProductDescription);
}
// Return the Value of the Private Class Members
int Essential::GetProductID() const
{
return (ProductID);
}
int Essential::GetManufacturersID() const
{
return (ManufacturersID);
}
int Essential::GetQuantityOfProduct() const
{
return (QuantityOfProduct);
}
double Essential::GetWholeSalePrice() const
{
return (WholeSalePrice);
}
double Essential::GetMarkUpPercentage() const
{
return (MarkUpPercentage);
}
char* Essential::GetProductDescription() const
{
return (ProductDescription);
}
// Display Information
void Essential::Display() const
{
//Display Data for Essential
cout << GetProductID() <<endl;
cout << GetManufacturersID() << endl;
cout << GetQuantityOfProduct() << endl;
cout << GetWholeSalePrice() <<endl;
cout << GetMarkUpPercentage() << endl;
cout << GetProductDescription() << endl;
}