Question: I'm having problem with returning string outside function. Is there some sort of convertion that should be done before ?

I'm using public `const int val_int[ ]` and `const char* val_rom[ ]` outside class.

And inside class:

```
private:
    char* roman;

public:
    char arab2rzym(int arabic) throw (RzymArabException){
        if( arabic < 0){
            throw RzymArabException(arabic + " is too small");
        }
        else if(arabic > 3999){
            throw new RzymArabException(arabic + " is too big");
        }
        std::string roman;

        for(int i=12; i>=0; i--){
            while(arabic>=val_int[i]){
                roman.append(val_int[i]);
                arabic-=val_int[i];
            }
        }
        return roman;

    }

```

Answer: 
Logically, a char is something like `'a'` or `'1'`, whereas a string would be `"a11a"`. If you expect this to work, what do you expect it to do? What would the char corresponding to `"a11a"` be? So, a single char corresponding to an array of chars?

To answer the question - you get the error because you can't convert a string to a char. How you fix it depend entirely on what you want to accomplish - most likely you don't want to return a `char`, but a `string`.
if you insist on return char, there are two solution to do that

first, declare a private std::string variable and return it through c\_str

```
private :
   std::string roman;

char const* arab2rzym(int arabic){
        if( arabic < 0){                
            throw RzymArabException(std::to_string(arabic) + " is too small");
        }
        else if(arabic > 3999){
            throw new RzymArabException(std::to_string(arabic) + " is too big");
        }        

        roman.clear();
        for(int i=12; i>=0; i--){
            while(arabic>=val_int[i]){
                roman.append(val_int[i]);
                arabic-=val_int[i];
            }
        }
        return roman.c_str();

    }

```

second, declare roman as static variable

```
    char const* arab2rzym(int arabic){
    if( arabic < 0){
        throw RzymArabException(std::to_string(arabic) + " is too small");
    }
    else if(arabic > 3999){
        throw new RzymArabException(std::to_string(arabic) + " is too big");
    }
    static std::string roman;
    roman.clear();

    for(int i=12; i>=0; i--){
        while(arabic>=val_int[i]){
            roman.append(val_int[i]);
            arabic-=val_int[i];
        }
    }
    return roman.c_str();

}

```

last thing to mention, I don't think RzymArabException(arabic + " is too big");
could do what you want, you should transform arabic to string before you do that

if your compiler support c++11

```
RzymArabException(std::to_string(arabic) + " is too big");

```

if not

```
RzymArabException((char)(((int)'0')+arabic) + std::string("is too big"));

```

better use reinterpret\_cast to cast it