I can do
std::ostringstream oss; oss << 1; oss.str();
so why can't I:
((std::ostringstream()) << 1).str() ?
Thanks!
The operator << returns the base type ostream , and the member function str exists only on the derived type ostringstream .
<<
ostream
str
ostringstream
Source: https://habr.com/ru/post/1300243/More articles:how to kill setTimeout () function - actionscriptConvert DateTime to yyyyMMdd int - c #How to cut a βholeβ inside a rectangular sprite to see the sprite under it? (ActionScript 3) - actionscript-3https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1300241/index.html&usg=ALkJrhhXAvFj85KRAfOKmD0MGEtRteMV_wHow to change default HTTP settings parameters in Java - javaCan I capture a Windows 7 DWM thumbnail window? - windows-7How can I use VisualStateManager to change the color of the text (foreground) of a ListBoxItem? - silverlightsoap client for ruby ββ1.9 and rails - soapConverting a form in UserControl - c #Is there a memcached Perl client that runs on Windows XP? - perlAll Articles