invalid conversion from const char** to char**

Dhiraj.Nilange@iflexsolutions.com Dhiraj.Nilange@iflexsolutions.com
Fri Jun 15 10:49:00 GMT 2007


Hi,

I am using g++ 4.1.1. on Linux (AMD-64-bit).

In a C++ code  I have a function whose prototype is given below:-

void fun(const char *var[]);

And I am passing the variable to this function defined as:-

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**

this code perfectly worked on other platforms using different conmpilers
(Windows,HP-UX,AIX etc). Only with Linux/g++ combination I get this
issue.

Please suggest some solution.

Thanks & Regards,
-Dhiraj



More information about the Gcc-help mailing list