MotorVehicle.cpp - #define_CRT_SECURE_NO_WARNINGS#include...

This preview shows page 1 - 2 out of 2 pages.

#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <fstream> #include <string> #include <cstring> #include <iomanip> #include "MotorVehicle.h" #include "Truck.h" using namespace std; namespace sdds { MotorVehicle::MotorVehicle(const char licPlateNo[], int year) { strcpy(this->license, licPlateNo); this->year = year; strcpy(this->address, "Factory"); } void MotorVehicle::moveTo(const char* address) { if (strcmp(this->address, address) != 0) { int I = strlen(this->license); if (I == 7) { cout << "| " << right << this->license << "| | " << setw(19) << right << this->address << " ---> " << setw(19) << left << address << " |" << endl; //cout << license << " | " << setw(20) << this->address << "--->---" << setw(20) << left << address << endl; strcpy(this->address, address); } else { cout << "| " << right << this->license << "| | " << setw(19) << right << this->address << " ---> "

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture