Error C2558
Posted: 2005-08-12 03:34pm
bit big...
contributor.h wrote:#ifndef CONTRIBUTOR_H //Preprocessor directives to prevent duplicate
#define CONTRIBUTOR_H // declarations. Use the file name of the identifier
//substituting an _ underscore for the period
//====================================================================
// CONSTANT DEFINITIONS
// formatting constants:
const int nameWidth = 30;
//******************************************************************************
// STANDARD AND USER DEFINED INCLUDES
#include <string>
#include <iostream>
using namespace std;
//******************************************************************************
// USER DEFINED DATA TYPES
class Contributor{
//friend functions
friend ostream & operator<<(ostream &out, Contributor RHS);
friend istream & operator>>(istream &in, Contributor &RHS);
public:
enum Gender{male, female, none};
//member functions
Contributor(string inName = string("A. Nonymous"), double inCont = 0.0,
Gender inSex = none, int inIDKey = 0);
Contributor(Contributor &inCont);
~Contributor();
Contributor &operator=(Contributor &RHS);
bool operator<(Contributor &RHS);
bool operator>(Contributor &RHS);
bool operator==(Contributor &RHS);
bool operator!=(Contributor &RHS);
string GetName() {return Name;}
double GetContribution() {return Contribution;}
Gender GetSex() {return Sex;}
int GetIDKey() {return IDKey;}
void SetName(string inName);
void SetContribution(double inCont);
void SetSex(Gender inSex);
void SetIDKey(int inIDKey);
static bool CompareByAlpha;
private:
string Name;
double Contribution;
Gender Sex;
int IDKey;
};
//******************************************************************************
// END OF CONDITIONAL BLOCK
#endif
//pop the stacks onto the final list
list<Contributor> Seating;
Seating.push_front(Contributor(string("Guest of Honor")));