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: 
Would it be possible for you to change signature of the method to:

```
std::string arab2rzym(int arabic)

```

if so, you can work with the string where you actually need it.

Anyway, I suggest you look into [std::string reference](http://www.cplusplus.com/reference/string/string/), especially [operator[]](http://www.cplusplus.com/reference/string/string/operator%5B%5D/) and method `c_str()`.
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