Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-06-17 10:08:56

Phil Richards wrote:

> Test regex/grep is failing due to a compilation error with g++ 4.0:
> ../libs/regex/example/grep/grep.cpp: In function 'int main(int, const
> char**)': ../libs/regex/example/grep/grep.cpp:130: error: invalid
> conversion from 'const char**' to 'char**'
> ../libs/regex/example/grep/grep.cpp:130: error: initializing argument 2
> of
> charT**) [with charT = char]'
> This is due to "main" being declared as:
> int main(int argc, const char * argv[])

And to clarify: the C++ standard says the second argument to main should be

   char* argv[]

Without 'const'.

- Volodya

Boost list run by bdawes at, gregod at, cpdaniel at, john at