> bool __stdcall preproc(const char *user, int type, const char * const
*argv,
> int argc)
>
> the bit im interested in is the
>
> const char * const *argv
That is a pointer pointing to constant-pointer pointing to const-char. Are
you still there?
It means that:
1. the argv pointer cannot change the value of the pointer it is pointing
to; *argv = 0 is not allowed.
2. the characters cannot be changed via this pointer to a pointer; **argv =
'a' is not allowed.
> iv never seen somthing decleared like this before and wonder if some one
> could explain it to me plz ?? i have a bit more info on it as follows.
> It looks like its an array because argv[0] contains a string and argv[1]
> also contains a string.
You are correct.
> if this is the case how was it made an array and is
> there a way i could find out the size of it.
Unfortunately there if no standard way to derive that information from argv
itself. Maybe that size of the array can be derived from other parameters or
maybe argv[last] == 0. You will have to ask the one who wrote that code I'm
affraid.
Note that in C++ this problem of passing a variable number of strings can be
solved much more elegantly with the help of the std::vector and the
std::string class.
--
Peter van Merkerk
peter.van.merkerk(at)dse.nl
|