I have a bluez header file get_opt.h
where argv
is an argument:
extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,.....
which requires char* const*
for argv
. Because the unit is called from a different file I was trying to emulate argv
but whatever permutation of declaring char
, const
and *
is used I get unqualified-id or the compiler moans about not converting to char* const*
. I can get const char *
easily, of course. char const * argv = "0";
compiles OK in Netbeans with C++14 but
char * const * argv = "0";
produces
"error: cannot convert 'const char *' to 'char * const *'" in initialisation (sic).
How do you declare char* const*
or am I mixing C with C++ so I'm up the wrong tree?