Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1348

Comment by HolyBlackCat on What problem in the C++ code for function template code?

$
0
0
Doesn't the box explain the problem? max (max(a,b), c) in this case returns const char* by value, which a temporary. You then return a reference to it, and the temporary dies right after returning from the function.

Viewing all articles
Browse latest Browse all 1348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>