const char** to char*const[]?

P

Philip.J.Yoon

Hello,

I have two functions:

void function1(char* const names[]);

void function2(const char** names)
{
//do other stuff

function1(names);

//do more stuff
}

My compiler (VS2005 C++) gives me "cannot convert parameter 1 from
const char** to char * const[]", which I'd expect. My question is how
do I convert from const char** to char* const[]? It's been a while
since I've programmed in C++.

Thanks.
 
P

Philip.J.Yoon

Hello,

I have two functions:

void function1(char* const names[]);

void function2(const char** names)
{
//do other stuff

function1(names);

//do more stuff

}

My compiler (VS2005 C++) gives me "cannot convert parameter 1 from
const char** to char * const[]", which I'd expect. My question is how
do I convert from const char** to char* const[]? It's been a while
since I've programmed in C++.

Thanks.

Hmm, nevermind this. char** must be equivalent to char*const[]. When I
took const out of const char**, the compiler stopped complaining.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top