void func ( string word = \"hello\", int b ) { // some jobs } in another function //calling func ( \"\", 10 ) ;
When I have compiled it, compi
You cannot fix it without changing anything!
To fix it, you can use overloading:
void func ( string word, int b ) { // some jobs } void func ( string word ) { func( word, 999 ); } void func ( int b ) { func( "hello", b ); }