I am having a hard time trying to run this excercise.
This works great up until the direction to declare the member functions
Once declaring romanType member functions protected:
___________________
class romanType
class romanType
{
protected:
void storeRomanInput(char RomanNum[25]);
void convertToDecimal(char storage[25]);
void printAsRoman();
void printAsDecimal();
};
I am unable to run these functions from an object of the romanType class:
___________________
romanType use;
int _tmain(int argc, _TCHAR* argv[])
{
cout <<"Hello World!" << endl;
cout << "This is a utility that will convert a Roman numeral to decimal." << endl;
cout << "Please type your Roman Numeral: ";
cin >> UserInput;
use.storeRomanInput(UserInput); //these lines cause
use.convertToDecimal(storage); //the error below
___________________
Error 2 error C2248: 'romanType::convertToDecimal' : cannot access protected member declared in class 'romanType'