if(strlen(str) + (strlen(ss.str) < sz)
it should be
if(strlen(str) + strlen(ss.str) < sz)
Note that you have 4 (, but only 3 )in the original line. They must match, but they do not. Since (the second one is strlen()superfluous (there is no need to wrap it in brackets strlen(ss.str)), you can delete it.
#include s . , #include string.h cstring ideone. . using namespace std;, std namepace, , . cout. .
, 4 , - , , " , , !" GCC , (, clang), , , .