[ create a new paste ] login | about

Link: http://codepad.org/qyHxCQYU    [ raw code | output | fork ]

C++, pasted on Aug 28:
#ifndef MEMBERPROF_H
#define MEMBERPROF_H
#include <iostream>
#include <string>
#include <vector>

class MemberProfile;

std::ostream &operator << (std::ostream&, const MemberProfile&);

class MemberProfile
{
	private:
		char gender;
		std::string name,
		            number,
				  matchName;
		int intNum;
		std::vector<std::string> interests;
		bool matched;

	public:
		MemberProfile();
		MemberProfile(char, std::string, std::string, int);

		void setInterests(std::string);
		void setGender(char);
		void setName(std::string);
		void setNum(std::string);
		void setIntNum(int);

		char getGender() const;
		int getIntNum() const;
		std::string getName() const;

		bool operator == (MemberProfile &right)
		{
			if (name == right.name && number == right.number)
			{
				return true;
			}
			else
			{
				return false;
			}
		}

	friend std::ostream &operator << (std::ostream &strm, const MemberProfile &obj)
     {
        strm << obj.getName();
        return strm;
    }
};


#endif


Output:
1
2
In function `_start':
undefined reference to `main'


Create a new paste based on this one


Comments: