Home:ALL Converter>C2244 - unable to match function definition to an existing declaration

C2244 - unable to match function definition to an existing declaration

Ask Time:2014-09-16T00:15:13         Author:George

Json Formatter

So I got the code below, and i've been browsing the questions on this site, and whatever else I found on google, but i just can't get the hang of it... S.O.S.

template <class C>
class Cod
{
private:
    SirString *sir_string;
    SirBinar *sir_binar;
    C* char_la_binar(C c);
    C* string_la_binar(C *s);
    C* binar_la_char(C *cod_binar);
    C* binar_la_string(C *cod_binar);

public:
    Cod();
    Cod(SirBinar *sb);
    Cod(SirString *ss);
    C* vezi_string();
    C* vezi_binar();
    void codificare();
    void decodificare();
};

template <class C>
inline char* Cod<C>::char_la_binar(C c)
{
    C *cod_binar = (C*) malloc (sizeof(C));
    strcpy(cod_binar, "");

    int aux = (int)c;
    while(aux)
    {
        if(aux%2 == 0) 
            strcat(cod_binar, "0");
        else
            strcat(cod_binar, "1");
        aux/=2;
    }
    cod_binar = strrev(cod_binar); //
    return cod_binar;
}

Error 11 error C2244: 'Proj::Cod::char_la_binar' : unable to match function definition to an existing declaration

Any ideas, sugestions ?

Author:George,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/25852416/c2244-unable-to-match-function-definition-to-an-existing-declaration
yy