hi any idea about this error.

In constructor `local_ExtraLogStreamBuf::local_ExtraLogStreamBuf()':
.cc:224: error: `setb' undeclared (first use this function)
.cc:224: error: (Each undeclared identifier is reported only once for each function it appears in.)
/usr/include/time.h: In member function `void local_ExtraLogStreamBuf::printAtLogLevel(char, const char*)':
/usr/include/time.h:250: error: too many arguments to function `char* asctime_r(const tm*, char*)'
.cc:284: error: at this point in file

This is because of setb(char *,char*) function, which i think we are not able to find in the headers which i included.The snippet is below:

#include <iostream.h>
#include <time.h>
#include <thread.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <strstream.h>

local_ExtraLogStreamBuf::local_ExtraLogStreamBuf() : streambuf()
{
   
      // set up buffer    
    // buffer +4 because due to processing we might want to write one byte
    // past end of streambuf end...
    _ptr = new char[BUFFERSIZE + 4]; // create buffer to write info....
    setb(_ptr, _ptr + BUFFERSIZE);
    setp(0,0);
    setg(0,0,0);  
  
}

And plz let me know in which header file i can get this stb(),setp, and setg() functions.
Plz help me out ..thank in advance.

i found setb,setp and setg in iostream.h of sunCompiler C++4.2..
Can anyone tel me its equivalent in gcc3.4.2. Coz i just cant see setb setp and setg in <iostream>...

Plz help me out..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.