what it means?

Hey, what it means?
const Allocator& = Allocator()
Where is the variable?
I know only eg
const Allocator& x = Allocator()
sorry for bad English
I think it means a compiler error.:)
I read it here
http://www.cplusplus.com/reference/stl/vector/vector/
explicit vector ( const Allocator& = Allocator() );
thank you
This means a default argument in the constructor declaration.
You may omit names of parameters in declarations or definitions of functions if they are not used. For example

1
2
3
int function( int = 10, int = 20 );

int function( int x, int y ) { return ( x + y ); }
Last edited on
thank you very much
Topic archived. No new replies allowed.