I'm having some problems with these 2 concepts. Any Advice?
Thanks
My errors:
Code:
eclared in class ‘expandedKey128’
expandedKey.cpp:10: error: no ‘void expandedKey192::printKey()’ member function declared in class ‘expandedKey192’
expandedKey.cpp:14: error: no ‘void expandedKey256::printKey()’ member function declared in class ‘expandedKey256’
Header:
Code:
#ifndef _EXPANDED_KEY_H_
#define _EXPANDED_KEY_H_
class expandedKey {
public:
virtual void printKey();
};
class expandedKey128: public expandedKey {
public:
char expandedKey[4][4];
};
class expandedKey192: public expandedKey {
public:
char expandedKey[4][4];
};
class expandedKey256: public expandedKey {
public:
char expandedKey[4][4];
};
#endif
Source:
Code:
#include <iostream>
using namespace std;
#include "expandedKey.h"
void expandedKey128::printKey() {
cout << "print key" << endl;
}
void expandedKey192::printKey() {
cout << "print key" << endl;
}
void expandedKey256::printKey() {
cout << "print key" << endl;
}