aboutsummaryrefslogtreecommitdiff
path: root/week10/Exercise05/ModernFN.cpp
blob: 72b51f01ca856ab0ced977b84146f8e030fb64ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "ModernFN.h"
#include <iostream>
#include <cstring>

ModernFN::ModernFN(const char* fn) : FN(atoi(fn + 5)) {
	strncpy(this->prefix, fn, 5);
	this->prefix[5] = '\0';
}

void ModernFN::PrintNewFN() {
	std::cout << this->prefix;
	PrintOldFN();
}