Why does this line give the error Error: incomplete type is not allowed?
Error: incomplete type is not allowed
stringstream ss;
Some of the system headers provide a forward declaration of std::stringstream without the definition. This makes it an 'incomplete type'. To fix that you need to include the definition, which is provided in the header:
std::stringstream
#include