Unable to use stringstream

Hello

I was working on the code of a pong game in C++ and SFML 2.1 and had to use std::stringstream in my code. But when I declared a stringstream as follows: std::stringstream Score_String;, my compiler prompts the following error:

D:\CodeBlocks\SFML 2.0\Pong\main.cpp|154|error: aggregate 'std::stringstream Score_String' has incomplete type and cannot be defined|


Does anyone have an idea what's wrong?

Thanks

Details:
I'm using Code::Blocks 12.11 with MinGW 4.7.2 and SFML 2.1. Also, I have included <iostream>.
Also, I have included <iostream>.


Did you include <sstream> ? If you look at the top right of the reference page for std::stringstream on this site, you will see the header you need to include to use it.

http://www.cplusplus.com/reference/sstream/stringstream/
Last edited on
I have no idea if this will help you, but I did this when Ii was trying to get my sfml to convert strings and it worked immediately after I replaced the .h files.

http://tehsausage.com/mingw-to-string

also try including
<iostream>
<string>
Last edited on
Topic archived. No new replies allowed.