This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: invalid conversion from const char** to char**
- From: me22 <me22 dot ca at gmail dot com>
- To: "Dhiraj dot Nilange at iflexsolutions dot com" <Dhiraj dot Nilange at iflexsolutions dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 15 Jun 2007 09:43:18 -0400
- Subject: Re: invalid conversion from const char** to char**
- References: <34C93EFE33190745869639BBB18AE4A69668C8@BLR-MSG-01.i-flex.com>
On 15/06/07, Dhiraj.Nilange@iflexsolutions.com
<Dhiraj.Nilange@iflexsolutions.com> 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