[Solved] wrong result in Visual Studio

[ad_1]

insert_recursively does not return a value when it goes into else block however you store the returned value (garbage) in right_linker or left_linker anyway.

Note that compiler issues a corresponding warning:

warning C4715: ‘insert_recursively’: not all control paths return a value

1

[ad_2]

solved wrong result in Visual Studio