From: Darin Adler (darin_at_[hidden])
Date: 2002-05-31 12:00:38
On Friday, May 31, 2002, at 09:33 AM, Victor A. Wagner, Jr. wrote:
> surely changing the required signature to allow for const is a better
> putting const in the signature ALLOWS you to pas both const _and_
> non-const items.
You can't pass a char ** to a function that takes a char const **. If
you could, that could create a const violation if you took a char const
*, put it in one of the array elements, then returned to the caller who
would then be able to treat it as a char * and modify it.
You can pass a char ** to a function that takes a char const * const *,
but that's something different.
But I don't think any of this is relevant to the problem the original
poster is reporting, because cpp_main is declared in cpp_main.cpp. In
his case, the signature has to match exactly, not just be compatible.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk