Question
#include #include using namespace std; class Person { private: unsigned age; string ssn; string name; public: Person(unsigned age, string ssn, string name); ~Person(); friend ostream&
#include
class Person { private: unsigned age; string ssn; string name; public: Person(unsigned age, string ssn, string name); ~Person(); friend ostream& operator
Person::Person(unsigned age, string ssn, string name) { this->age = age; this->ssn = ssn; this->name = name; } Person::~Person() { // cout
// Function to print whole map void printMap(map int main(int argc, char ** argv) { // Initialize map map // Create person objects Person person1(34,"123-45-6780","Jon"); Person person2(35,"123-45-6781","Brendan"); Person person3(36,"123-45-6782","David"); Person person4(37,"123-45-6783","Alex"); Person person5(38,"123-45-6784","Anwar"); Person person6(39,"123-45-6785","Max"); Person person7(40,"123-45-6786","Ian"); Person person8(40,"123-45-6787","Gabriella"); Person person9(40,"123-45-6788","Sarah"); Person person10(40,"123-45-6789","Austin"); // Insert person objects in map bankAccountMap.insert(pair // Print size of map cout // Iterage and print map cout // Delete one person entry (delete person4) bankAccountMap.erase(1233); // Iterage and print map cout // Delete last entry bankAccountMap.erase(1239); // Iterage and print map cout return 0; } I need the code above to be split up into 3 different files. I'm using MobaXterm and I need the code to be split into a: personClass.h file personClass.cpp file bankAccountMap.cpp file. I tried to split the code up myself, but received errors in multiple places when I did. These are the errors I kept seeing. but The The code itself works exactly the way it should, but it needs to be in 3 separate files, like this.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started