//Package.h #ifndef PACKAGE_H #define PACKAGE_H #include <string> using std::string; class Package { public: Package(const string &, const string &, const string &, const string &, int = 0, const string &, const string &, const string &, const string &, int = 0, double = 0.0 , double = 0.0 );// top part is sender, middle is reciever, bottom is weight and price private: string senderName; string senderAddress; string senderCity; string senderState; int senderZip; string recieverName; string recieverAddress; string recieverCity; string recieverState; int recieverZip; double weight; double price; };//end of class package #endif |
//Package.cpp #include <iostream> using std::cout; #include "Package.h" //package class definition //constructor Package::Package( const string &sName, const string &sAddress ,const string &sState, const string &sCity, int sZip, const string &reciverN, const string &recieverA , const string &recieverS, const string &recieverC, int rZip, double w, double p ) { senderName = sName; senderAddress = sAddress; senderCity = sCity; senderState = sSate; senderZip = sZip; recieverName = recieverN; recieverAddress = recieverA; recieverCity = recieverC; recieverState = recieverS; recieverZip = rZip; weight = w; price = p; }//end of package constructor |
1>------ Build started: Project: HW4, Configuration: Debug Win32 ------ 1>Compiling... 1>Package.cpp 1>c:\users\john\documents\visual studio 2008\projects\hw4\hw4\package.h(11) : error C2548: 'Package::Package' : missing default parameter for parameter 6 1>c:\users\john\documents\visual studio 2008\projects\hw4\hw4\package.h(11) : error C2548: 'Package::Package' : missing default parameter for parameter 7 1>c:\users\john\documents\visual studio 2008\projects\hw4\hw4\package.h(11) : error C2548: 'Package::Package' : missing default parameter for parameter 8 1>c:\users\john\documents\visual studio 2008\projects\hw4\hw4\package.h(11) : error C2548: 'Package::Package' : missing default parameter for parameter 9 1>c:\users\john\documents\visual studio 2008\projects\hw4\hw4\package.cpp(13) : error C2065: 'sSate' : undeclared identifier 1>c:\users\john\documents\visual studio 2008\projects\hw4\hw4\package.cpp(15) : error C2065: 'recieverN' : undeclared identifier 1>PackageMain.cpp 1>c:\users\john\documents\visual studio 2008\projects\hw4\hw4\package.h(11) : error C2548: 'Package::Package' : missing default parameter for parameter 6 1>c:\users\john\documents\visual studio 2008\projects\hw4\hw4\package.h(11) : error C2548: 'Package::Package' : missing default parameter for parameter 7 1>c:\users\john\documents\visual studio 2008\projects\hw4\hw4\package.h(11) : error C2548: 'Package::Package' : missing default parameter for parameter 8 1>c:\users\john\documents\visual studio 2008\projects\hw4\hw4\package.h(11) : error C2548: 'Package::Package' : missing default parameter for parameter 9 1>Generating Code... 1>Build log was saved at "file://c:\Users\John\Documents\Visual Studio 2008\Projects\HW4\HW4\Debug\BuildLog.htm" 1>HW4 - 10 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
|
|