Re: invalid conversion from const char** to char**

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15/06/07, Dhiraj.Nilange@xxxxxxxxxxxxxxxxxx
<Dhiraj.Nilange@xxxxxxxxxxxxxxxxxx> wrote:
void fun(const char *var[]);
const char **vname;

so the call goes as:-    fun(vname);

But I get compile time error for this:-
invalid conversion from const char** to char**

I don't think we can solve this one without more information.

void fun(char const *var[]) {}
int main() {
   char const **vname;
   fun(vname);
}

Compiles cleanly with -ansi -pedantic.

Make sure nothing is defining away const, or something similar.

~ Scott

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux