invalid conversion from const char** to char**

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

 



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



[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