Yes, a stringstream might be perfect for this endeavor. Not only will it work with GUIs, it will work with cout and other streams as well. No need to reinvent the wheel later, so to speak.