resetting a stringstream [duplicate] January 4, 2023 by Tarik This is the way I usually do it: ss.str(""); ss.clear(); // Clear state flags.