1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

problem with int_type.... More options

Discussion in 'C++' started by SpreadTooThin, Mar 30, 2007.

  1. SpreadTooThin

    SpreadTooThin New Member

    Joined:
    Mar 30, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    My compiler seems unhappy with int_type

    The method declaration is:
    Code:
    int_type dbgBuf::overflow(int_type ch) 
    { 
    #ifdef FF_DEBUG 
            if (traits_type::not_eof(ch)) 
            { 
                    if (at_start) 
                    { 
                            for (int i = 0; i < level; ++i) 
                            { 
                                    if (log_on) 
                                    { 
                                            buffer->sputc(traits_type::to_char_type('\t')); 
                                    } 
                            } 
                    } 
    
                    if (log_on) 
                            buffer->sputc(traits_type::to_char_type(ch)); 
    
                    if (traits_type::eq_int_type(ch, traits_type::to_int_type('\n'))) 
                    { 
                            at_start = true; 
                    } 
                    else 
                    { 
                            at_start = false; 
                    } 
            } 
    #endif 
            return ch; 
    } 
    The error I'm getting is:

    error: 'int_type' does not name a type.

    So I tried:
    traits_type::int_type dbgBuf::eek:verflow(traits_type::int_type ch)

    and I get:
    error 'traits_type' has not been declared
    error: 'int_type' has does not name a type

    NOTE:
    None of the other 'traits_type' like to_char_type or to_int_type seem to be affected... or maybe they just haven't been complied yet....

    Is there perhaps a header file I'm forgetting to include?


    MAC OS X. 10.4
    XCode
     

Share This Page