[Solved] how returning reference work here [duplicate]


I can’t tell you why code is organized as it is, but having static there makes it survive function exit. If static would not be used, then it would be allocated on stack and rewritten later.

solved how returning reference work here [duplicate]