The following function declaration:
void Foo:DoSomething( ULONG &Count = 0) { .... }
Results in the following compile time error
error C2440: default argument cannot convert from 'int' to 'ULONG &'
What is the correct way of creating the signature so that when there is no parameter provided for Count
its value will be zero.
You're taking a non-const reference to Count, so it can't be assigned by default with r-value.
Use
void Foo:DoSomething( const ULONG &Count = 0) { .... }
void Foo:DoSomething( ULONG Count = 0) { .... }