So basically i have this class
when i try to use it in my function 'convertArabictoRoman'
it says that the variable 'thous' is undeclared
Looked it over soooo many times and i still cant figure out why its not reading it?????
//romanType Class
class romanType
{
public:
//Public functions
romanType();//Constructor
void getArabicNumber();//reads in arabic number
void getRomanNumeral();//reads in roman numeral
void convertArabictoRoman();//converts number from arabic to roman (*Not working*)
private:
//private members
int arabnum,thous;//arabic number
char romannum[50];//array for roman numeral
};
//simplified implementation file
#include "romanType.h"
#include <iostream>
using namespace std;
//Constructor for 'romanType' class
romanType::romanType()
{
arabnum=0;
thous=0;
the thing is that in the 'convertArabictoRoman()' function im not declaring it again
it turns out (which i dont know why) the problem got fixed after i deleted my .h file and re made it
for some reason the compiler accepted that one and it now works just fine