SlideShare a Scribd company logo
1 of 25
Download to read offline
I have the following code and I need to know why I am receiving the following errors:
Error 1 error C2436: '{ctor}' : member function or nested class in constructor initializer list
(line 287)
Error 2 error C2436: '{ctor}' : member function or nested class in constructor initializer list
(line 385)
#include
#include
#include
#include
using namespace std;
enum contactGroupType
{// used in extPersonType
FAMILY,
FRIEND,
BUSINESS,
UNFILLED
};
class addressType
{
private:
string st_address;
string city;
string state;
int zip;
public:
void print(string, string, string, int)const;
void setStreet(string);
string getStreet()const;
void setCity(string);
string getCity()const;
void setState(string);
string getState()const;
void setZip(int);
int getZip()const;
void set(string, string, string, int);// set all address fields
string get()const;// get address as one concatenated string
addressType();
// ~addressType();
};
class personType
{
private:
string firstName;
string lastName;
public:
void print()const;
void setName(string first, string last);
string getFirstName()const;
string getLastName()const;
string get()const;// return First Last names concatenated
personType & operator=(const personType &);
personType(string, string);
personType();
};
class dateType
{
private:
int dMonth;
int dDay;
int dYear;
public:
void setDate(int month, int day, int year);
int getDay()const;
int getMonth()const;
int getYear()const;
void print()const;
string get()const;// return string representation as DD/MM/YYYY
dateType & operator=(const dateType & d);
dateType(int, int, int);
dateType();
};
class extPersonType :public personType {
private:
addressType address;// added members
dateType birthday;
contactGroupType group;
string phone;
public:
// methods
void setPhone(string);
string getPhone()const;
void setGroup(contactGroupType);
contactGroupType getGroup()const;
void setBirthday(int, int, int);
dateType getBirthday()const;
void print();
string get()const;// return string representation of ext person type
extPersonType & operator=(const extPersonType & p);
string groupToString(contactGroupType)const;
contactGroupType extPersonType::stringToGroup(string)const;
// constructors
extPersonType();
extPersonType(string first, string last);
};
// because we have no arrayListType, we are using our own
// implementation with a small subset of functions
class arrayListType
{
extPersonType array[500];
int size;
public:
arrayListType();
extPersonType & operator[](int i);
void removeLast();// remove last element
void add(const extPersonType &);// add new element
int getSize()const;// get array size
};
class addressBookType :public arrayListType
{
private:
static const char FS = 't';// field separator in file (TAB char)
int current;// current position
string fileName;// filename
fstream fileStream;// file as fstream
/* filiters */
contactGroupType fltGroup;
string fltFromLast, fltToLast;
dateType fltFromDate, fltTiDate;
/* flags for effective filters */
bool fltStatus, fltLast, fltDateRange, fltDate;
/* field numbering in the file */
static const int _first = 0;
static const int _last = 1;
static const int _street = 2;
static const int _city = 3;
static const int _state = 4;
static const int _phone = 5;
static const int _zip = 6;
static const int _year = 7;
static const int _month = 8;
static const int _day = 9;
static const int _group = 10;
static const int _end = _group;
public:
addressBookType();
bool readFile(string);// read file into addressBook array
bool writeFile(string);// pass filename, write to file
void reset();// reset 'current' position
extPersonType * getNext();// allows to navigate in forward direction
/* by group name */
void setFilterStatus(contactGroupType);
/* by last name */
void setFilterLastname(string from, string to);// define range
/* by birthday */
void setFilterBirthday(dateType from, dateType to);
/* clear all filters */
void clearFilters();
void print(int i);// print personal data of [i] person
};
// Main program
int main()
{
return 0;
}
/*****************implementation of print & set function*****/
// constructor with parameters
addressType::addressType()
{
st_address = "";
city = "";
state = "";
zip = 0;
}
void addressType::set(string addr, string city, string state, int zip)
{
this->st_address = addr;
this->city = city;
this->state = state;
this->zip = zip;
}
void addressType::setStreet(string street)
{
this->st_address = street;
}
string addressType::getStreet()const
{
return this->st_address;
}
void addressType::setCity(string street)
{
this->city = street;
}
string addressType::getState()const
{
return this->state;
}
void addressType::setState(string street)
{
this->st_address = street;
}
void addressType::setZip(int code)
{
this->zip = code;
}
int addressType::getZip()const
{
return this->zip;
}
/* personType implementation */
personType::personType()
{// constructor
this->setName("", "");
}
personType::personType(string first, string last){// constructor
this->setName(first, last);
}
void personType::setName(string first, string last)
{
firstName = first;
lastName = last;
}
string personType::getFirstName()const
{
return firstName;
}
string personType::getLastName()const
{
return lastName;
}
void personType::print()const
{
cout << get() << " ";
}
string personType::get()const
{
return firstName + " " + lastName;
}
personType & personType::operator=(const personType & p)
{
setName(p.getFirstName(), p.getLastName());
return*this;
}
/* Constructor */
dateType::dateType()
{
setDate(1, 1, 1900);
}
dateType::dateType(int d, int m, int y)
{
setDate(d, m, y);
}
int dateType::getDay()const
{
return dDay;
}
int dateType::getMonth()const
{
return dMonth;
}
int dateType::getYear()const
{
return dYear;
}
void dateType::setDate(int d, int m, int y)
{
dDay = d;
dMonth = m;
dYear = y;
}
void dateType::print()const
{
cout << get() << " ";
}
string dateType::get()const
{
string a;
a = dDay;
a += "/";
a += dMonth;
a += "/";
a += dYear;
return a;
}
dateType & dateType::operator=(const dateType & d)
{
this->dDay = d.getDay();
this->dMonth = d.getMonth();
this->dYear = d.getYear();
return*this;
}
/* Implementation of extPersonType */
extPersonType::extPersonType()
{
phone = "";
group = UNFILLED;
birthday.setDate(01, 01, 1900);
}
extPersonType::extPersonType(string first, string last) : personType::personType(first, last)
{
phone = "";
group = UNFILLED;
birthday.setDate(01, 01, 1900);
}
void extPersonType::setBirthday(int d, int m, int y)
{
birthday.setDate(d, m, y);
}
dateType extPersonType::getBirthday()const
{
return birthday;
}
void extPersonType::setGroup(contactGroupType gr)
{
group = gr;
}
contactGroupType extPersonType::getGroup()const
{
return group;
}
void extPersonType::setPhone(string ph)
{
phone = ph;
}
string extPersonType::getPhone()const
{
return phone;
}
// Override parent's 'get()' add phone and birthday
string extPersonType::get()const
{
string result;
result = this->personType::get();
result = result + " " + birthday.get() + " " + phone + " " + groupToString(group);
return result;
}
extPersonType & extPersonType::operator=(const extPersonType & p)
{
// first call superclass' operator=
(personType)*this = (personType)p;
// now assign birthday, phone and category
this->phone = p.getPhone();
this->birthday = p.getBirthday();
this->group = p.getGroup();
return*this;
}
string extPersonType::groupToString(contactGroupType a)const
{
string result;
switch (a)
{
case FAMILY:
result = "FAMILY";
break;
case FRIEND:
result = "FRIEND";
break;
case BUSINESS:
result = "BUSINESS";
break;
case UNFILLED:
result = "";
break;
}
return result;
}
contactGroupType extPersonType::stringToGroup(string a)const
{
contactGroupType result;
if (a.compare("FAMILY") == 0) result = FAMILY;
else if(a.compare("FRIEND") == 0) result = FRIEND;
else if(a.compare("BUSINESS") == 0) result = BUSINESS;
else result = UNFILLED;
return result;
}
arrayListType::arrayListType()
{
size = 0;
}
int arrayListType::getSize()const
{
return size;
}
void arrayListType::removeLast()
{
size--;
}
void arrayListType::add(const extPersonType &p)
{
array[size++] = p;
}
extPersonType & arrayListType::operator[](int i)
{
return array[i];
}
/* addressBookType implementation */
addressBookType::addressBookType() : arrayListType::arrayListType()
{
reset();
clearFilters();
}
void addressBookType::reset()
{
current = 0;
}
void addressBookType::clearFilters()
{
fltStatus = fltDate = fltLast = fltDateRange = false;
}
/* Read array from file, return false on error */
bool addressBookType::readFile(string filename)
{
string line;
string fields[_end + 1];// _last index of the last field
extPersonType p;// temporary 'person' instance
int pos1 = 0, pos2 = 0, index;
fileStream.open(filename.c_str(), ios::in);
reset();// reset 'current' counter
clearFilters();
while (!fileStream.eof()){// read line by line
fileStream >> line;
// fields are in the following order:
// first, last, street, city, state, zip, phone, status, year, month, day
for (index = 0; index <= _end; index++) fields[index] = "";// initialize
pos2 = 0; pos1 = -1;
index = 0;
do
{// read field by field
pos1 = pos2 + 1;// +1 is for field separator
pos2 = line.find(FS, pos1);
fields[index] = line.substr(pos1, pos2 - pos1);// get field from line
index++;
}
while (pos2 >= 0 && index <= _end);
// now fields[] are filled with fields from file
p.setName(fields[_first], fields[_last]);
p.setPhone(fields[_phone]);
p.setGroup(p.stringToGroup(fields[_group]));// convert string to enum
// set birthday
p.getBirthday().setDate(atoi(fields[_month].c_str()),
atoi(fields[_day].c_str()),
atoi(fields[_year].c_str()));
// add 'p' to array
this->add(p);
}
// while () next line from file
fileStream.close();
return true;
}
// Write to file (stub)
bool addressBookType::writeFile(string filename)
{
return true;
}
Solution
actually the problem is with lines 285 and 384 erase the lines and try with my code u will be
getting
#include
#include
using namespace std;
enum contactGroupType
{// used in extPersonType
FAMILY,
FRIEND,
BUSINESS,
UNFILLED
};
class addressType
{
private:
string st_address;
string city;
string state;
int zip;
public:
void print(string, string, string, int)const;
void setStreet(string);
string getStreet()const;
void setCity(string);
string getCity()const;
void setState(string);
string getState()const;
void setZip(int);
int getZip()const;
void set(string, string, string, int);// set all address fields
string get()const;// get address as one concatenated string
addressType();
// ~addressType();
};
class personType
{
private:
string firstName;
string lastName;
public:
void print()const;
void setName(string first, string last);
string getFirstName()const;
string getLastName()const;
string get()const;// return First Last names concatenated
personType & operator=(const personType &);
personType(string, string);
personType();
};
class dateType
{
private:
int dMonth;
int dDay;
int dYear;
public:
void setDate(int month, int day, int year);
int getDay()const;
int getMonth()const;
int getYear()const;
void print()const;
string get()const;// return string representation as DD/MM/YYYY
dateType & operator=(const dateType & d);
dateType(int, int, int);
dateType();
};
class extPersonType :public personType {
private:
addressType address;// added members
dateType birthday;
contactGroupType group;
string phone;
public:
// methods
void setPhone(string);
string getPhone()const;
void setGroup(contactGroupType);
contactGroupType getGroup()const;
void setBirthday(int, int, int);
dateType getBirthday()const;
void print();
string get()const;// return string representation of ext person type
extPersonType & operator=(const extPersonType & p);
string groupToString(contactGroupType)const;
contactGroupType extPersonType::stringToGroup(string)const;
// constructors
extPersonType();
extPersonType(string first, string last);
};
// because we have no arrayListType, we are using our own
// implementation with a small subset of functions
class arrayListType
{
extPersonType array[500];
int size;
public:
arrayListType();
extPersonType & operator[](int i);
void removeLast();// remove last element
void add(const extPersonType &);// add new element
int getSize()const;// get array size
};
class addressBookType :public arrayListType
{
private:
static const char FS = 't';// field separator in file (TAB char)
int current;// current position
string fileName;// filename
fstream fileStream;// file as fstream
/* filiters */
contactGroupType fltGroup;
string fltFromLast, fltToLast;
dateType fltFromDate, fltTiDate;
/* flags for effective filters */
bool fltStatus, fltLast, fltDateRange, fltDate;
/* field numbering in the file */
static const int _first = 0;
static const int _last = 1;
static const int _street = 2;
static const int _city = 3;
static const int _state = 4;
static const int _phone = 5;
static const int _zip = 6;
static const int _year = 7;
static const int _month = 8;
static const int _day = 9;
static const int _group = 10;
static const int _end = _group;
public:
addressBookType();
bool readFile(string);// read file into addressBook array
bool writeFile(string);// pass filename, write to file
void reset();// reset 'current' position
extPersonType * getNext();// allows to navigate in forward direction
/* by group name */
void setFilterStatus(contactGroupType);
/* by last name */
void setFilterLastname(string from, string to);// define range
/* by birthday */
void setFilterBirthday(dateType from, dateType to);
/* clear all filters */
void clearFilters();
void print(int i);// print personal data of [i] person
};
// Main program
int main()
{
return 0;
}
/*****************implementation of print & set function*****/
// constructor with parameters
addressType::addressType()
{
st_address = "";
city = "";
state = "";
zip = 0;
}
void addressType::set(string addr, string city, string state, int zip)
{
this->st_address = addr;
this->city = city;
this->state = state;
this->zip = zip;
}
void addressType::setStreet(string street)
{
this->st_address = street;
}
string addressType::getStreet()const
{
return this->st_address;
}
void addressType::setCity(string street)
{
this->city = street;
}
string addressType::getState()const
{
return this->state;
}
void addressType::setState(string street)
{
this->st_address = street;
}
void addressType::setZip(int code)
{
this->zip = code;
}
int addressType::getZip()const
{
return this->zip;
}
/* personType implementation */
personType::personType()
{// constructor
this->setName("", "");
}
personType::personType(string first, string last){// constructor
this->setName(first, last);
}
void personType::setName(string first, string last)
{
firstName = first;
lastName = last;
}
string personType::getFirstName()const
{
return firstName;
}
string personType::getLastName()const
{
return lastName;
}
void personType::print()const
{
cout << get() << " ";
}
string personType::get()const
{
return firstName + " " + lastName;
}
personType & personType::operator=(const personType & p)
{
setName(p.getFirstName(), p.getLastName());
return*this;
}
/* Constructor */
dateType::dateType()
{
setDate(1, 1, 1900);
}
dateType::dateType(int d, int m, int y)
{
setDate(d, m, y);
}
int dateType::getDay()const
{
return dDay;
}
int dateType::getMonth()const
{
return dMonth;
}
int dateType::getYear()const
{
return dYear;
}
void dateType::setDate(int d, int m, int y)
{
dDay = d;
dMonth = m;
dYear = y;
}
void dateType::print()const
{
cout << get() << " ";
}
string dateType::get()const
{
string a;
a = dDay;
a += "/";
a += dMonth;
a += "/";
a += dYear;
return a;
}
dateType & dateType::operator=(const dateType & d)
{
this->dDay = d.getDay();
this->dMonth = d.getMonth();
this->dYear = d.getYear();
return*this;
}
/* Implementation of extPersonType */
extPersonType::extPersonType()
{
phone = "";
group = UNFILLED;
birthday.setDate(01, 01, 1900);
}
extPersonType::extPersonType(string first, string last) : personType::personType(first, last)
{
phone = "";
group = UNFILLED;
birthday.setDate(01, 01, 1900);
}
void extPersonType::setBirthday(int d, int m, int y)
{
birthday.setDate(d, m, y);
}
dateType extPersonType::getBirthday()const
{
return birthday;
}
void extPersonType::setGroup(contactGroupType gr)
{
group = gr;
}
contactGroupType extPersonType::getGroup()const
{
return group;
}
void extPersonType::setPhone(string ph)
{
phone = ph;
}
string extPersonType::getPhone()const
{
return phone;
}
// Override parent's 'get()' add phone and birthday
string extPersonType::get()const
{
string result;
result = this->personType::get();
result = result + " " + birthday.get() + " " + phone + " " + groupToString(group);
return result;
}
extPersonType & extPersonType::operator=(const extPersonType & p)
{
// first call superclass' operator=
(personType)*this = (personType)p;
// now assign birthday, phone and category
this->phone = p.getPhone();
this->birthday = p.getBirthday();
this->group = p.getGroup();
return*this;
}
string extPersonType::groupToString(contactGroupType a)const
{
string result;
switch (a)
{
case FAMILY:
result = "FAMILY";
break;
case FRIEND:
result = "FRIEND";
break;
case BUSINESS:
result = "BUSINESS";
break;
case UNFILLED:
result = "";
break;
}
return result;
}
contactGroupType extPersonType::stringToGroup(string a)const
{
contactGroupType result;
if (a.compare("FAMILY") == 0) result = FAMILY;
else if(a.compare("FRIEND") == 0) result = FRIEND;
else if(a.compare("BUSINESS") == 0) result = BUSINESS;
else result = UNFILLED;
return result;
}
arrayListType::arrayListType()
{
size = 0;
}
int arrayListType::getSize()const
{
return size;
}
void arrayListType::removeLast()
{
size--;
}
void arrayListType::add(const extPersonType &p)
{
array[size++] = p;
}
extPersonType & arrayListType::operator[](int i)
{
return array[i];
}
/* addressBookType implementation */
addressBookType::addressBookType() : arrayListType::arrayListType()
{
reset();
clearFilters();
}
void addressBookType::reset()
{
current = 0;
}
void addressBookType::clearFilters()
{
fltStatus = fltDate = fltLast = fltDateRange = false;
}
/* Read array from file, return false on error */
bool addressBookType::readFile(string filename)
{
string line;
string fields[_end + 1];// _last index of the last field
extPersonType p;// temporary 'person' instance
int pos1 = 0, pos2 = 0, index;
fileStream.open(filename.c_str(), ios::in);
reset();// reset 'current' counter
clearFilters();
while (!fileStream.eof()){// read line by line
fileStream >> line;
// fields are in the following order:
// first, last, street, city, state, zip, phone, status, year, month, day
for (index = 0; index <= _end; index++) fields[index] = "";// initialize
pos2 = 0; pos1 = -1;
index = 0;
do
{// read field by field
pos1 = pos2 + 1;// +1 is for field separator
pos2 = line.find(FS, pos1);
fields[index] = line.substr(pos1, pos2 - pos1);// get field from line
index++;
}
while (pos2 >= 0 && index <= _end);
// now fields[] are filled with fields from file
p.setName(fields[_first], fields[_last]);
p.setPhone(fields[_phone]);
p.setGroup(p.stringToGroup(fields[_group]));// convert string to enum
// set birthday
p.getBirthday().setDate(atoi(fields[_month].c_str()),
atoi(fields[_day].c_str()),
atoi(fields[_year].c_str()));
// add 'p' to array
this->add(p);
}
// while () next line from file
fileStream.close();
return true;
}
// Write to file (stub)
bool addressBookType::writeFile(string filename)
{
return true;
}

More Related Content

Similar to I have the following code and I need to know why I am receiving the .pdf

for initializer_list include ltinitializer_listgt .pdf
 for initializer_list include ltinitializer_listgt .pdf for initializer_list include ltinitializer_listgt .pdf
for initializer_list include ltinitializer_listgt .pdfajay1317
 
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdfModify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdfarjuncorner565
 
maincpp Build and procees a sorted linked list of Patie.pdf
maincpp   Build and procees a sorted linked list of Patie.pdfmaincpp   Build and procees a sorted linked list of Patie.pdf
maincpp Build and procees a sorted linked list of Patie.pdfadityastores21
 
Use the code below from the previous assignment that we need to exte.pdf
Use the code below from the previous assignment that we need to exte.pdfUse the code below from the previous assignment that we need to exte.pdf
Use the code below from the previous assignment that we need to exte.pdfsales87
 
PLEASE MAKE SURE THE PROGRAM IS ASKING FOR INPUT FROM USER TO ADD OR.pdf
PLEASE MAKE SURE THE PROGRAM IS ASKING FOR INPUT FROM USER TO ADD OR.pdfPLEASE MAKE SURE THE PROGRAM IS ASKING FOR INPUT FROM USER TO ADD OR.pdf
PLEASE MAKE SURE THE PROGRAM IS ASKING FOR INPUT FROM USER TO ADD OR.pdfmallik3000
 
My question is pretty simple, I just want to know how to call my ope.pdf
My question is pretty simple, I just want to know how to call my ope.pdfMy question is pretty simple, I just want to know how to call my ope.pdf
My question is pretty simple, I just want to know how to call my ope.pdfjeetumordhani
 
I have to write a polynomial class linked list program and i do not .pdf
I have to write a polynomial class linked list program and i do not .pdfI have to write a polynomial class linked list program and i do not .pdf
I have to write a polynomial class linked list program and i do not .pdfjibinsh
 
could you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdfcould you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdfferoz544
 
I keep on get a redefinition error and an undefined error.Customer.pdf
I keep on get a redefinition error and an undefined error.Customer.pdfI keep on get a redefinition error and an undefined error.Customer.pdf
I keep on get a redefinition error and an undefined error.Customer.pdfherminaherman
 
There are a number of errors in the following program- All errors are.docx
There are a number of errors in the following program- All errors are.docxThere are a number of errors in the following program- All errors are.docx
There are a number of errors in the following program- All errors are.docxclarkjanyce
 
#include iostream #include cstring #include vector #i.pdf
 #include iostream #include cstring #include vector #i.pdf #include iostream #include cstring #include vector #i.pdf
#include iostream #include cstring #include vector #i.pdfanandatalapatra
 
Что нам готовит грядущий C#7?
Что нам готовит грядущий C#7?Что нам готовит грядущий C#7?
Что нам готовит грядущий C#7?Andrey Akinshin
 
C programming.   For this code I only need to add a function so th.pdf
C programming.   For this code I only need to add a function so th.pdfC programming.   For this code I only need to add a function so th.pdf
C programming.   For this code I only need to add a function so th.pdfbadshetoms
 
IN C LANGUAGE- I've been trying to finish this program for the last fe.docx
IN C LANGUAGE- I've been trying to finish this program for the last fe.docxIN C LANGUAGE- I've been trying to finish this program for the last fe.docx
IN C LANGUAGE- I've been trying to finish this program for the last fe.docxGordonpACKellyb
 
Please read the comment ins codeExpressionTree.java-------------.pdf
Please read the comment ins codeExpressionTree.java-------------.pdfPlease read the comment ins codeExpressionTree.java-------------.pdf
Please read the comment ins codeExpressionTree.java-------------.pdfshanki7
 
please help with java questionsJAVA CODEplease check my code and.pdf
please help with java questionsJAVA CODEplease check my code and.pdfplease help with java questionsJAVA CODEplease check my code and.pdf
please help with java questionsJAVA CODEplease check my code and.pdfarishmarketing21
 
Program of sorting using shell sort #include stdio.h #de.pdf
 Program of sorting using shell sort  #include stdio.h #de.pdf Program of sorting using shell sort  #include stdio.h #de.pdf
Program of sorting using shell sort #include stdio.h #de.pdfanujmkt
 
#include iostream #includeData.h #includePerson.h#in.pdf
#include iostream #includeData.h #includePerson.h#in.pdf#include iostream #includeData.h #includePerson.h#in.pdf
#include iostream #includeData.h #includePerson.h#in.pdfannucommunication1
 

Similar to I have the following code and I need to know why I am receiving the .pdf (20)

for initializer_list include ltinitializer_listgt .pdf
 for initializer_list include ltinitializer_listgt .pdf for initializer_list include ltinitializer_listgt .pdf
for initializer_list include ltinitializer_listgt .pdf
 
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdfModify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
 
c programming
c programmingc programming
c programming
 
maincpp Build and procees a sorted linked list of Patie.pdf
maincpp   Build and procees a sorted linked list of Patie.pdfmaincpp   Build and procees a sorted linked list of Patie.pdf
maincpp Build and procees a sorted linked list of Patie.pdf
 
Use the code below from the previous assignment that we need to exte.pdf
Use the code below from the previous assignment that we need to exte.pdfUse the code below from the previous assignment that we need to exte.pdf
Use the code below from the previous assignment that we need to exte.pdf
 
PLEASE MAKE SURE THE PROGRAM IS ASKING FOR INPUT FROM USER TO ADD OR.pdf
PLEASE MAKE SURE THE PROGRAM IS ASKING FOR INPUT FROM USER TO ADD OR.pdfPLEASE MAKE SURE THE PROGRAM IS ASKING FOR INPUT FROM USER TO ADD OR.pdf
PLEASE MAKE SURE THE PROGRAM IS ASKING FOR INPUT FROM USER TO ADD OR.pdf
 
My question is pretty simple, I just want to know how to call my ope.pdf
My question is pretty simple, I just want to know how to call my ope.pdfMy question is pretty simple, I just want to know how to call my ope.pdf
My question is pretty simple, I just want to know how to call my ope.pdf
 
Overloading
OverloadingOverloading
Overloading
 
I have to write a polynomial class linked list program and i do not .pdf
I have to write a polynomial class linked list program and i do not .pdfI have to write a polynomial class linked list program and i do not .pdf
I have to write a polynomial class linked list program and i do not .pdf
 
could you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdfcould you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdf
 
I keep on get a redefinition error and an undefined error.Customer.pdf
I keep on get a redefinition error and an undefined error.Customer.pdfI keep on get a redefinition error and an undefined error.Customer.pdf
I keep on get a redefinition error and an undefined error.Customer.pdf
 
There are a number of errors in the following program- All errors are.docx
There are a number of errors in the following program- All errors are.docxThere are a number of errors in the following program- All errors are.docx
There are a number of errors in the following program- All errors are.docx
 
#include iostream #include cstring #include vector #i.pdf
 #include iostream #include cstring #include vector #i.pdf #include iostream #include cstring #include vector #i.pdf
#include iostream #include cstring #include vector #i.pdf
 
Что нам готовит грядущий C#7?
Что нам готовит грядущий C#7?Что нам готовит грядущий C#7?
Что нам готовит грядущий C#7?
 
C programming.   For this code I only need to add a function so th.pdf
C programming.   For this code I only need to add a function so th.pdfC programming.   For this code I only need to add a function so th.pdf
C programming.   For this code I only need to add a function so th.pdf
 
IN C LANGUAGE- I've been trying to finish this program for the last fe.docx
IN C LANGUAGE- I've been trying to finish this program for the last fe.docxIN C LANGUAGE- I've been trying to finish this program for the last fe.docx
IN C LANGUAGE- I've been trying to finish this program for the last fe.docx
 
Please read the comment ins codeExpressionTree.java-------------.pdf
Please read the comment ins codeExpressionTree.java-------------.pdfPlease read the comment ins codeExpressionTree.java-------------.pdf
Please read the comment ins codeExpressionTree.java-------------.pdf
 
please help with java questionsJAVA CODEplease check my code and.pdf
please help with java questionsJAVA CODEplease check my code and.pdfplease help with java questionsJAVA CODEplease check my code and.pdf
please help with java questionsJAVA CODEplease check my code and.pdf
 
Program of sorting using shell sort #include stdio.h #de.pdf
 Program of sorting using shell sort  #include stdio.h #de.pdf Program of sorting using shell sort  #include stdio.h #de.pdf
Program of sorting using shell sort #include stdio.h #de.pdf
 
#include iostream #includeData.h #includePerson.h#in.pdf
#include iostream #includeData.h #includePerson.h#in.pdf#include iostream #includeData.h #includePerson.h#in.pdf
#include iostream #includeData.h #includePerson.h#in.pdf
 

More from ezzi552

Execute the following code and identify the errors in the program. D.pdf
Execute the following code and identify the errors in the program. D.pdfExecute the following code and identify the errors in the program. D.pdf
Execute the following code and identify the errors in the program. D.pdfezzi552
 
Essay question The genomes of lots and lots of organisms (mostly ba.pdf
Essay question The genomes of lots and lots of organisms (mostly ba.pdfEssay question The genomes of lots and lots of organisms (mostly ba.pdf
Essay question The genomes of lots and lots of organisms (mostly ba.pdfezzi552
 
Consider the language L = { anb2n n 0 }.Give an implementation.pdf
Consider the language L = { anb2n  n  0 }.Give an implementation.pdfConsider the language L = { anb2n  n  0 }.Give an implementation.pdf
Consider the language L = { anb2n n 0 }.Give an implementation.pdfezzi552
 
Case Study.You are the Chair of the Department of Surgery at a lar.pdf
Case Study.You are the Chair of the Department of Surgery at a lar.pdfCase Study.You are the Chair of the Department of Surgery at a lar.pdf
Case Study.You are the Chair of the Department of Surgery at a lar.pdfezzi552
 
An Unsorted Type ADT is to be extended by the addition of function S.pdf
An Unsorted Type ADT is to be extended by the addition of function S.pdfAn Unsorted Type ADT is to be extended by the addition of function S.pdf
An Unsorted Type ADT is to be extended by the addition of function S.pdfezzi552
 
alue 0.83 points M7-6 Calculating Cost of Goods Available for Sale, E.pdf
alue 0.83 points M7-6 Calculating Cost of Goods Available for Sale, E.pdfalue 0.83 points M7-6 Calculating Cost of Goods Available for Sale, E.pdf
alue 0.83 points M7-6 Calculating Cost of Goods Available for Sale, E.pdfezzi552
 
1)Using general mass-media (such as news sites) identify a recent co.pdf
1)Using general mass-media (such as news sites) identify a recent co.pdf1)Using general mass-media (such as news sites) identify a recent co.pdf
1)Using general mass-media (such as news sites) identify a recent co.pdfezzi552
 
1. The notion that two network exist in the brain, one for emotional.pdf
1. The notion that two network exist in the brain, one for emotional.pdf1. The notion that two network exist in the brain, one for emotional.pdf
1. The notion that two network exist in the brain, one for emotional.pdfezzi552
 
Which of the following is a bank liabilityA. Reserve deposits at .pdf
Which of the following is a bank liabilityA. Reserve deposits at .pdfWhich of the following is a bank liabilityA. Reserve deposits at .pdf
Which of the following is a bank liabilityA. Reserve deposits at .pdfezzi552
 
What was Eisenhower’s reinsurance plan What was Eisenhower’s r.pdf
What was Eisenhower’s reinsurance plan What was Eisenhower’s r.pdfWhat was Eisenhower’s reinsurance plan What was Eisenhower’s r.pdf
What was Eisenhower’s reinsurance plan What was Eisenhower’s r.pdfezzi552
 
What does the following program do What’s its time complexity Just.pdf
What does the following program do What’s its time complexity Just.pdfWhat does the following program do What’s its time complexity Just.pdf
What does the following program do What’s its time complexity Just.pdfezzi552
 
What is not true about the membranes of prokaryotic organism a. The.pdf
What is not true about the membranes of prokaryotic organism  a. The.pdfWhat is not true about the membranes of prokaryotic organism  a. The.pdf
What is not true about the membranes of prokaryotic organism a. The.pdfezzi552
 
What behavior characteristics are associated with each of the four s.pdf
What behavior characteristics are associated with each of the four s.pdfWhat behavior characteristics are associated with each of the four s.pdf
What behavior characteristics are associated with each of the four s.pdfezzi552
 
What are someways to better understand accounting There is a lot of.pdf
What are someways to better understand accounting There is a lot of.pdfWhat are someways to better understand accounting There is a lot of.pdf
What are someways to better understand accounting There is a lot of.pdfezzi552
 
Based on the elements from the Ruby Payne readings create a resource.pdf
Based on the elements from the Ruby Payne readings create a resource.pdfBased on the elements from the Ruby Payne readings create a resource.pdf
Based on the elements from the Ruby Payne readings create a resource.pdfezzi552
 
The answer has to be original.For this week’s discussion, complete.pdf
The answer has to be original.For this week’s discussion, complete.pdfThe answer has to be original.For this week’s discussion, complete.pdf
The answer has to be original.For this week’s discussion, complete.pdfezzi552
 
Assume you have a scanner object (called input).Declare an integer.pdf
Assume you have a scanner object (called input).Declare an integer.pdfAssume you have a scanner object (called input).Declare an integer.pdf
Assume you have a scanner object (called input).Declare an integer.pdfezzi552
 
6. Establishing priorities is an issue that local governments strugg.pdf
6. Establishing priorities is an issue that local governments strugg.pdf6. Establishing priorities is an issue that local governments strugg.pdf
6. Establishing priorities is an issue that local governments strugg.pdfezzi552
 
Suppose that A and B are attributes of a certain relational table. G.pdf
Suppose that A and B are attributes of a certain relational table. G.pdfSuppose that A and B are attributes of a certain relational table. G.pdf
Suppose that A and B are attributes of a certain relational table. G.pdfezzi552
 
RHCE is least associated with which Rh group (D--, R1r, Ror, Rzy) .pdf
RHCE is least associated with which Rh group (D--, R1r, Ror, Rzy) .pdfRHCE is least associated with which Rh group (D--, R1r, Ror, Rzy) .pdf
RHCE is least associated with which Rh group (D--, R1r, Ror, Rzy) .pdfezzi552
 

More from ezzi552 (20)

Execute the following code and identify the errors in the program. D.pdf
Execute the following code and identify the errors in the program. D.pdfExecute the following code and identify the errors in the program. D.pdf
Execute the following code and identify the errors in the program. D.pdf
 
Essay question The genomes of lots and lots of organisms (mostly ba.pdf
Essay question The genomes of lots and lots of organisms (mostly ba.pdfEssay question The genomes of lots and lots of organisms (mostly ba.pdf
Essay question The genomes of lots and lots of organisms (mostly ba.pdf
 
Consider the language L = { anb2n n 0 }.Give an implementation.pdf
Consider the language L = { anb2n  n  0 }.Give an implementation.pdfConsider the language L = { anb2n  n  0 }.Give an implementation.pdf
Consider the language L = { anb2n n 0 }.Give an implementation.pdf
 
Case Study.You are the Chair of the Department of Surgery at a lar.pdf
Case Study.You are the Chair of the Department of Surgery at a lar.pdfCase Study.You are the Chair of the Department of Surgery at a lar.pdf
Case Study.You are the Chair of the Department of Surgery at a lar.pdf
 
An Unsorted Type ADT is to be extended by the addition of function S.pdf
An Unsorted Type ADT is to be extended by the addition of function S.pdfAn Unsorted Type ADT is to be extended by the addition of function S.pdf
An Unsorted Type ADT is to be extended by the addition of function S.pdf
 
alue 0.83 points M7-6 Calculating Cost of Goods Available for Sale, E.pdf
alue 0.83 points M7-6 Calculating Cost of Goods Available for Sale, E.pdfalue 0.83 points M7-6 Calculating Cost of Goods Available for Sale, E.pdf
alue 0.83 points M7-6 Calculating Cost of Goods Available for Sale, E.pdf
 
1)Using general mass-media (such as news sites) identify a recent co.pdf
1)Using general mass-media (such as news sites) identify a recent co.pdf1)Using general mass-media (such as news sites) identify a recent co.pdf
1)Using general mass-media (such as news sites) identify a recent co.pdf
 
1. The notion that two network exist in the brain, one for emotional.pdf
1. The notion that two network exist in the brain, one for emotional.pdf1. The notion that two network exist in the brain, one for emotional.pdf
1. The notion that two network exist in the brain, one for emotional.pdf
 
Which of the following is a bank liabilityA. Reserve deposits at .pdf
Which of the following is a bank liabilityA. Reserve deposits at .pdfWhich of the following is a bank liabilityA. Reserve deposits at .pdf
Which of the following is a bank liabilityA. Reserve deposits at .pdf
 
What was Eisenhower’s reinsurance plan What was Eisenhower’s r.pdf
What was Eisenhower’s reinsurance plan What was Eisenhower’s r.pdfWhat was Eisenhower’s reinsurance plan What was Eisenhower’s r.pdf
What was Eisenhower’s reinsurance plan What was Eisenhower’s r.pdf
 
What does the following program do What’s its time complexity Just.pdf
What does the following program do What’s its time complexity Just.pdfWhat does the following program do What’s its time complexity Just.pdf
What does the following program do What’s its time complexity Just.pdf
 
What is not true about the membranes of prokaryotic organism a. The.pdf
What is not true about the membranes of prokaryotic organism  a. The.pdfWhat is not true about the membranes of prokaryotic organism  a. The.pdf
What is not true about the membranes of prokaryotic organism a. The.pdf
 
What behavior characteristics are associated with each of the four s.pdf
What behavior characteristics are associated with each of the four s.pdfWhat behavior characteristics are associated with each of the four s.pdf
What behavior characteristics are associated with each of the four s.pdf
 
What are someways to better understand accounting There is a lot of.pdf
What are someways to better understand accounting There is a lot of.pdfWhat are someways to better understand accounting There is a lot of.pdf
What are someways to better understand accounting There is a lot of.pdf
 
Based on the elements from the Ruby Payne readings create a resource.pdf
Based on the elements from the Ruby Payne readings create a resource.pdfBased on the elements from the Ruby Payne readings create a resource.pdf
Based on the elements from the Ruby Payne readings create a resource.pdf
 
The answer has to be original.For this week’s discussion, complete.pdf
The answer has to be original.For this week’s discussion, complete.pdfThe answer has to be original.For this week’s discussion, complete.pdf
The answer has to be original.For this week’s discussion, complete.pdf
 
Assume you have a scanner object (called input).Declare an integer.pdf
Assume you have a scanner object (called input).Declare an integer.pdfAssume you have a scanner object (called input).Declare an integer.pdf
Assume you have a scanner object (called input).Declare an integer.pdf
 
6. Establishing priorities is an issue that local governments strugg.pdf
6. Establishing priorities is an issue that local governments strugg.pdf6. Establishing priorities is an issue that local governments strugg.pdf
6. Establishing priorities is an issue that local governments strugg.pdf
 
Suppose that A and B are attributes of a certain relational table. G.pdf
Suppose that A and B are attributes of a certain relational table. G.pdfSuppose that A and B are attributes of a certain relational table. G.pdf
Suppose that A and B are attributes of a certain relational table. G.pdf
 
RHCE is least associated with which Rh group (D--, R1r, Ror, Rzy) .pdf
RHCE is least associated with which Rh group (D--, R1r, Ror, Rzy) .pdfRHCE is least associated with which Rh group (D--, R1r, Ror, Rzy) .pdf
RHCE is least associated with which Rh group (D--, R1r, Ror, Rzy) .pdf
 

Recently uploaded

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 

Recently uploaded (20)

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 

I have the following code and I need to know why I am receiving the .pdf

  • 1. I have the following code and I need to know why I am receiving the following errors: Error 1 error C2436: '{ctor}' : member function or nested class in constructor initializer list (line 287) Error 2 error C2436: '{ctor}' : member function or nested class in constructor initializer list (line 385) #include #include #include #include using namespace std; enum contactGroupType {// used in extPersonType FAMILY, FRIEND, BUSINESS, UNFILLED }; class addressType { private: string st_address; string city; string state; int zip; public: void print(string, string, string, int)const; void setStreet(string); string getStreet()const; void setCity(string); string getCity()const; void setState(string); string getState()const; void setZip(int); int getZip()const; void set(string, string, string, int);// set all address fields
  • 2. string get()const;// get address as one concatenated string addressType(); // ~addressType(); }; class personType { private: string firstName; string lastName; public: void print()const; void setName(string first, string last); string getFirstName()const; string getLastName()const; string get()const;// return First Last names concatenated personType & operator=(const personType &); personType(string, string); personType(); }; class dateType { private: int dMonth; int dDay; int dYear; public: void setDate(int month, int day, int year); int getDay()const; int getMonth()const; int getYear()const; void print()const; string get()const;// return string representation as DD/MM/YYYY dateType & operator=(const dateType & d); dateType(int, int, int); dateType(); };
  • 3. class extPersonType :public personType { private: addressType address;// added members dateType birthday; contactGroupType group; string phone; public: // methods void setPhone(string); string getPhone()const; void setGroup(contactGroupType); contactGroupType getGroup()const; void setBirthday(int, int, int); dateType getBirthday()const; void print(); string get()const;// return string representation of ext person type extPersonType & operator=(const extPersonType & p); string groupToString(contactGroupType)const; contactGroupType extPersonType::stringToGroup(string)const; // constructors extPersonType(); extPersonType(string first, string last); }; // because we have no arrayListType, we are using our own // implementation with a small subset of functions class arrayListType { extPersonType array[500]; int size; public: arrayListType(); extPersonType & operator[](int i); void removeLast();// remove last element void add(const extPersonType &);// add new element int getSize()const;// get array size };
  • 4. class addressBookType :public arrayListType { private: static const char FS = 't';// field separator in file (TAB char) int current;// current position string fileName;// filename fstream fileStream;// file as fstream /* filiters */ contactGroupType fltGroup; string fltFromLast, fltToLast; dateType fltFromDate, fltTiDate; /* flags for effective filters */ bool fltStatus, fltLast, fltDateRange, fltDate; /* field numbering in the file */ static const int _first = 0; static const int _last = 1; static const int _street = 2; static const int _city = 3; static const int _state = 4; static const int _phone = 5; static const int _zip = 6; static const int _year = 7; static const int _month = 8; static const int _day = 9; static const int _group = 10; static const int _end = _group; public: addressBookType(); bool readFile(string);// read file into addressBook array bool writeFile(string);// pass filename, write to file void reset();// reset 'current' position extPersonType * getNext();// allows to navigate in forward direction /* by group name */ void setFilterStatus(contactGroupType); /* by last name */ void setFilterLastname(string from, string to);// define range
  • 5. /* by birthday */ void setFilterBirthday(dateType from, dateType to); /* clear all filters */ void clearFilters(); void print(int i);// print personal data of [i] person }; // Main program int main() { return 0; } /*****************implementation of print & set function*****/ // constructor with parameters addressType::addressType() { st_address = ""; city = ""; state = ""; zip = 0; } void addressType::set(string addr, string city, string state, int zip) { this->st_address = addr; this->city = city; this->state = state; this->zip = zip; } void addressType::setStreet(string street) { this->st_address = street; } string addressType::getStreet()const { return this->st_address; } void addressType::setCity(string street)
  • 6. { this->city = street; } string addressType::getState()const { return this->state; } void addressType::setState(string street) { this->st_address = street; } void addressType::setZip(int code) { this->zip = code; } int addressType::getZip()const { return this->zip; } /* personType implementation */ personType::personType() {// constructor this->setName("", ""); } personType::personType(string first, string last){// constructor this->setName(first, last); } void personType::setName(string first, string last) { firstName = first; lastName = last; } string personType::getFirstName()const { return firstName; }
  • 7. string personType::getLastName()const { return lastName; } void personType::print()const { cout << get() << " "; } string personType::get()const { return firstName + " " + lastName; } personType & personType::operator=(const personType & p) { setName(p.getFirstName(), p.getLastName()); return*this; } /* Constructor */ dateType::dateType() { setDate(1, 1, 1900); } dateType::dateType(int d, int m, int y) { setDate(d, m, y); } int dateType::getDay()const { return dDay; } int dateType::getMonth()const { return dMonth; } int dateType::getYear()const {
  • 8. return dYear; } void dateType::setDate(int d, int m, int y) { dDay = d; dMonth = m; dYear = y; } void dateType::print()const { cout << get() << " "; } string dateType::get()const { string a; a = dDay; a += "/"; a += dMonth; a += "/"; a += dYear; return a; } dateType & dateType::operator=(const dateType & d) { this->dDay = d.getDay(); this->dMonth = d.getMonth(); this->dYear = d.getYear(); return*this; } /* Implementation of extPersonType */ extPersonType::extPersonType() { phone = ""; group = UNFILLED; birthday.setDate(01, 01, 1900); }
  • 9. extPersonType::extPersonType(string first, string last) : personType::personType(first, last) { phone = ""; group = UNFILLED; birthday.setDate(01, 01, 1900); } void extPersonType::setBirthday(int d, int m, int y) { birthday.setDate(d, m, y); } dateType extPersonType::getBirthday()const { return birthday; } void extPersonType::setGroup(contactGroupType gr) { group = gr; } contactGroupType extPersonType::getGroup()const { return group; } void extPersonType::setPhone(string ph) { phone = ph; } string extPersonType::getPhone()const { return phone; } // Override parent's 'get()' add phone and birthday string extPersonType::get()const { string result; result = this->personType::get(); result = result + " " + birthday.get() + " " + phone + " " + groupToString(group);
  • 10. return result; } extPersonType & extPersonType::operator=(const extPersonType & p) { // first call superclass' operator= (personType)*this = (personType)p; // now assign birthday, phone and category this->phone = p.getPhone(); this->birthday = p.getBirthday(); this->group = p.getGroup(); return*this; } string extPersonType::groupToString(contactGroupType a)const { string result; switch (a) { case FAMILY: result = "FAMILY"; break; case FRIEND: result = "FRIEND"; break; case BUSINESS: result = "BUSINESS"; break; case UNFILLED: result = ""; break; } return result; } contactGroupType extPersonType::stringToGroup(string a)const { contactGroupType result; if (a.compare("FAMILY") == 0) result = FAMILY;
  • 11. else if(a.compare("FRIEND") == 0) result = FRIEND; else if(a.compare("BUSINESS") == 0) result = BUSINESS; else result = UNFILLED; return result; } arrayListType::arrayListType() { size = 0; } int arrayListType::getSize()const { return size; } void arrayListType::removeLast() { size--; } void arrayListType::add(const extPersonType &p) { array[size++] = p; } extPersonType & arrayListType::operator[](int i) { return array[i]; } /* addressBookType implementation */ addressBookType::addressBookType() : arrayListType::arrayListType() { reset(); clearFilters(); } void addressBookType::reset() { current = 0; } void addressBookType::clearFilters()
  • 12. { fltStatus = fltDate = fltLast = fltDateRange = false; } /* Read array from file, return false on error */ bool addressBookType::readFile(string filename) { string line; string fields[_end + 1];// _last index of the last field extPersonType p;// temporary 'person' instance int pos1 = 0, pos2 = 0, index; fileStream.open(filename.c_str(), ios::in); reset();// reset 'current' counter clearFilters(); while (!fileStream.eof()){// read line by line fileStream >> line; // fields are in the following order: // first, last, street, city, state, zip, phone, status, year, month, day for (index = 0; index <= _end; index++) fields[index] = "";// initialize pos2 = 0; pos1 = -1; index = 0; do {// read field by field pos1 = pos2 + 1;// +1 is for field separator pos2 = line.find(FS, pos1); fields[index] = line.substr(pos1, pos2 - pos1);// get field from line index++; } while (pos2 >= 0 && index <= _end); // now fields[] are filled with fields from file p.setName(fields[_first], fields[_last]); p.setPhone(fields[_phone]); p.setGroup(p.stringToGroup(fields[_group]));// convert string to enum // set birthday p.getBirthday().setDate(atoi(fields[_month].c_str()), atoi(fields[_day].c_str()), atoi(fields[_year].c_str()));
  • 13. // add 'p' to array this->add(p); } // while () next line from file fileStream.close(); return true; } // Write to file (stub) bool addressBookType::writeFile(string filename) { return true; } Solution actually the problem is with lines 285 and 384 erase the lines and try with my code u will be getting #include #include using namespace std; enum contactGroupType {// used in extPersonType FAMILY, FRIEND, BUSINESS, UNFILLED }; class addressType { private: string st_address; string city; string state; int zip; public: void print(string, string, string, int)const;
  • 14. void setStreet(string); string getStreet()const; void setCity(string); string getCity()const; void setState(string); string getState()const; void setZip(int); int getZip()const; void set(string, string, string, int);// set all address fields string get()const;// get address as one concatenated string addressType(); // ~addressType(); }; class personType { private: string firstName; string lastName; public: void print()const; void setName(string first, string last); string getFirstName()const; string getLastName()const; string get()const;// return First Last names concatenated personType & operator=(const personType &); personType(string, string); personType(); }; class dateType { private: int dMonth; int dDay; int dYear; public: void setDate(int month, int day, int year);
  • 15. int getDay()const; int getMonth()const; int getYear()const; void print()const; string get()const;// return string representation as DD/MM/YYYY dateType & operator=(const dateType & d); dateType(int, int, int); dateType(); }; class extPersonType :public personType { private: addressType address;// added members dateType birthday; contactGroupType group; string phone; public: // methods void setPhone(string); string getPhone()const; void setGroup(contactGroupType); contactGroupType getGroup()const; void setBirthday(int, int, int); dateType getBirthday()const; void print(); string get()const;// return string representation of ext person type extPersonType & operator=(const extPersonType & p); string groupToString(contactGroupType)const; contactGroupType extPersonType::stringToGroup(string)const; // constructors extPersonType(); extPersonType(string first, string last); }; // because we have no arrayListType, we are using our own // implementation with a small subset of functions class arrayListType {
  • 16. extPersonType array[500]; int size; public: arrayListType(); extPersonType & operator[](int i); void removeLast();// remove last element void add(const extPersonType &);// add new element int getSize()const;// get array size }; class addressBookType :public arrayListType { private: static const char FS = 't';// field separator in file (TAB char) int current;// current position string fileName;// filename fstream fileStream;// file as fstream /* filiters */ contactGroupType fltGroup; string fltFromLast, fltToLast; dateType fltFromDate, fltTiDate; /* flags for effective filters */ bool fltStatus, fltLast, fltDateRange, fltDate; /* field numbering in the file */ static const int _first = 0; static const int _last = 1; static const int _street = 2; static const int _city = 3; static const int _state = 4; static const int _phone = 5; static const int _zip = 6; static const int _year = 7; static const int _month = 8; static const int _day = 9; static const int _group = 10; static const int _end = _group; public:
  • 17. addressBookType(); bool readFile(string);// read file into addressBook array bool writeFile(string);// pass filename, write to file void reset();// reset 'current' position extPersonType * getNext();// allows to navigate in forward direction /* by group name */ void setFilterStatus(contactGroupType); /* by last name */ void setFilterLastname(string from, string to);// define range /* by birthday */ void setFilterBirthday(dateType from, dateType to); /* clear all filters */ void clearFilters(); void print(int i);// print personal data of [i] person }; // Main program int main() { return 0; } /*****************implementation of print & set function*****/ // constructor with parameters addressType::addressType() { st_address = ""; city = ""; state = ""; zip = 0; } void addressType::set(string addr, string city, string state, int zip) { this->st_address = addr; this->city = city; this->state = state; this->zip = zip; }
  • 18. void addressType::setStreet(string street) { this->st_address = street; } string addressType::getStreet()const { return this->st_address; } void addressType::setCity(string street) { this->city = street; } string addressType::getState()const { return this->state; } void addressType::setState(string street) { this->st_address = street; } void addressType::setZip(int code) { this->zip = code; } int addressType::getZip()const { return this->zip; } /* personType implementation */ personType::personType() {// constructor this->setName("", ""); } personType::personType(string first, string last){// constructor this->setName(first, last); }
  • 19. void personType::setName(string first, string last) { firstName = first; lastName = last; } string personType::getFirstName()const { return firstName; } string personType::getLastName()const { return lastName; } void personType::print()const { cout << get() << " "; } string personType::get()const { return firstName + " " + lastName; } personType & personType::operator=(const personType & p) { setName(p.getFirstName(), p.getLastName()); return*this; } /* Constructor */ dateType::dateType() { setDate(1, 1, 1900); } dateType::dateType(int d, int m, int y) { setDate(d, m, y); } int dateType::getDay()const
  • 20. { return dDay; } int dateType::getMonth()const { return dMonth; } int dateType::getYear()const { return dYear; } void dateType::setDate(int d, int m, int y) { dDay = d; dMonth = m; dYear = y; } void dateType::print()const { cout << get() << " "; } string dateType::get()const { string a; a = dDay; a += "/"; a += dMonth; a += "/"; a += dYear; return a; } dateType & dateType::operator=(const dateType & d) { this->dDay = d.getDay(); this->dMonth = d.getMonth(); this->dYear = d.getYear();
  • 21. return*this; } /* Implementation of extPersonType */ extPersonType::extPersonType() { phone = ""; group = UNFILLED; birthday.setDate(01, 01, 1900); } extPersonType::extPersonType(string first, string last) : personType::personType(first, last) { phone = ""; group = UNFILLED; birthday.setDate(01, 01, 1900); } void extPersonType::setBirthday(int d, int m, int y) { birthday.setDate(d, m, y); } dateType extPersonType::getBirthday()const { return birthday; } void extPersonType::setGroup(contactGroupType gr) { group = gr; } contactGroupType extPersonType::getGroup()const { return group; } void extPersonType::setPhone(string ph) { phone = ph; } string extPersonType::getPhone()const
  • 22. { return phone; } // Override parent's 'get()' add phone and birthday string extPersonType::get()const { string result; result = this->personType::get(); result = result + " " + birthday.get() + " " + phone + " " + groupToString(group); return result; } extPersonType & extPersonType::operator=(const extPersonType & p) { // first call superclass' operator= (personType)*this = (personType)p; // now assign birthday, phone and category this->phone = p.getPhone(); this->birthday = p.getBirthday(); this->group = p.getGroup(); return*this; } string extPersonType::groupToString(contactGroupType a)const { string result; switch (a) { case FAMILY: result = "FAMILY"; break; case FRIEND: result = "FRIEND"; break; case BUSINESS: result = "BUSINESS"; break; case UNFILLED:
  • 23. result = ""; break; } return result; } contactGroupType extPersonType::stringToGroup(string a)const { contactGroupType result; if (a.compare("FAMILY") == 0) result = FAMILY; else if(a.compare("FRIEND") == 0) result = FRIEND; else if(a.compare("BUSINESS") == 0) result = BUSINESS; else result = UNFILLED; return result; } arrayListType::arrayListType() { size = 0; } int arrayListType::getSize()const { return size; } void arrayListType::removeLast() { size--; } void arrayListType::add(const extPersonType &p) { array[size++] = p; } extPersonType & arrayListType::operator[](int i) { return array[i]; } /* addressBookType implementation */ addressBookType::addressBookType() : arrayListType::arrayListType()
  • 24. { reset(); clearFilters(); } void addressBookType::reset() { current = 0; } void addressBookType::clearFilters() { fltStatus = fltDate = fltLast = fltDateRange = false; } /* Read array from file, return false on error */ bool addressBookType::readFile(string filename) { string line; string fields[_end + 1];// _last index of the last field extPersonType p;// temporary 'person' instance int pos1 = 0, pos2 = 0, index; fileStream.open(filename.c_str(), ios::in); reset();// reset 'current' counter clearFilters(); while (!fileStream.eof()){// read line by line fileStream >> line; // fields are in the following order: // first, last, street, city, state, zip, phone, status, year, month, day for (index = 0; index <= _end; index++) fields[index] = "";// initialize pos2 = 0; pos1 = -1; index = 0; do {// read field by field pos1 = pos2 + 1;// +1 is for field separator pos2 = line.find(FS, pos1); fields[index] = line.substr(pos1, pos2 - pos1);// get field from line index++; }
  • 25. while (pos2 >= 0 && index <= _end); // now fields[] are filled with fields from file p.setName(fields[_first], fields[_last]); p.setPhone(fields[_phone]); p.setGroup(p.stringToGroup(fields[_group]));// convert string to enum // set birthday p.getBirthday().setDate(atoi(fields[_month].c_str()), atoi(fields[_day].c_str()), atoi(fields[_year].c_str())); // add 'p' to array this->add(p); } // while () next line from file fileStream.close(); return true; } // Write to file (stub) bool addressBookType::writeFile(string filename) { return true; }