ho provato il codice inserito in questo programma ma non funziona:

codice:
#include <windows.h>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <boost/circular_buffer.hpp>
using namespace std;
using namespace boost;

void getDateTime(char * szTime);
const int numbuff = 5;
const int buflen  = 30;

struct Buffer
{
public:
	vector<char> vChar;
	int bufferLength;
	int bytesRecorded;
	int user;
	Buffer() : bytesRecorded(0), bufferLength(0), user(0) { };
};

int main()
{
	circular_buffer<Buffer> cb(numbuff);
	circular_buffer<Buffer>::const_iterator it;

	// Insert elements
	for(int i = 0; i<10; i++)
	{
		// Get time
		char szTime[30]; getDateTime(szTime);

		// Init Buff
		Buffer buff;
		copy(&szTime[0],&szTime[30],std::back_inserter(buff.vChar));

		//buff.vChar.assign(szTime, szTime+strlen(szTime));
		buff.bufferLength  = buflen;
		buff.bytesRecorded = buflen;
		buff.user          = i;

		printf("%d, %d, %s\n", buff.user, buff.bufferLength, szTime);

		cb.push_back(buff);
	}

	// Show elements:
	for(int i = 0; i<(int)cb.size(); i++)
	{
		printf("%d, %d, %s\n", cb[i].user, cb[i].bufferLength, cb[i].vChar);
	}

	system("pause");
	return EXIT_SUCCESS;
}

// getDateTime (Fri, 10 Oct 2008 14:41:59 GMT)
void getDateTime(char * szTime)
{
	time_t rawtime = time(NULL);
	struct tm timeinfo;
	gmtime_s(&timeinfo, &rawtime);
	strftime(szTime, 30, "%a, %d %b %Y %X GMT", &timeinfo);
}
nel secondo loop for, mi ritorna <null>