#include <iostream>
#include <fstream>
#include <string>
#include <cstring>
using namespace std;
int main (int argc, char *argv[])
{
char logItemBuffer[129];
int lineLen = 128;
memset(logItemBuffer,’#’,lineLen);
logItemBuffer[129] = ‘\0’;
//write meta info
string logMetaInfo = "LOG_META_TAG:ItemTypeNum:JobName:TaskName:InstanceID:StartTime—:";
strncpy(logItemBuffer,logMetaInfo.c_str(),logMetaInfo.size());
fstream fout("test.txt",ios::in|ios::out);
if ( !fout.is_open() ) {
return 0;
}