Error Converting String to Double

I'm trying to convert a string to a double. I read in from a file into a char array. I took the array and built a string without any spaces. Now, I'm trying to convert the string built to a double, but I keep getting an error. Any help, tips, or comments are greatly appreciated!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
        inFile.get(JournalAmount, 10);
        cout << JournalAmount << " ";


        for(int i = 0; i < 10; i++)
        {
            if(JournalAmount[i] != ' ')
            {
                MyString = MyString + JournalAmount[i];
            }
        }

        istringstream stm;
        stm.str(MyString);
        double Amount;
        stm >> Amount;

        cout << MyString << endl;



error: aggregate 'std::istringstream stm' has incomplete type and cannot be defined|
Did you include header <sstream>?
Ah! Dumb mistake. Thanks for that!
Topic archived. No new replies allowed.