strstream class

I'm trying to incorporate the strstream class into my project using code from another website (since I have no idea what I'm doing) and the compiler (microsoft visual studio) is flagging errors.

1
2
3
4
5
6
7
8
9
10
11
12
 class strstream : public basic_iostream<char> {
 public:
    // Types
    typedef char char_type;
    typedef typename char_traits<char>::int_type int_type;
    typedef typename char_traits<char>::pos_type pos_type;
    typedef typename char_traits<char>::off_type off_type;
 
    // constructors/destructor
    strstream();
    strstream(char* s, int n,
    ios_base::openmode mode = ios_base::in


error C2899: typename cannot be used outside a template declaration
error C2899: typename cannot be used outside a template declaration
error C2899: typename cannot be used outside a template declaration
error C2059: syntax error : '}'
fatal error C1004: unexpected end-of-file found
Topic archived. No new replies allowed.