Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  postmanconfig.c
Language: C/C++
Code:
#include <stdio.h>
#include <string>
#include <iostream>
#include <fstream>

int main(int argc, char *argv[])
{
     std::ifstream infile("POSTMAN.EXE.cnfg");
     if(!infile)
     {
          std::cout << "File not found!"<<std::endl;
          return 0;
     }
     std::cout << "File found!"<<std::endl;
     std::ofstream ofile("tmp.txt");
     bool correct = false;
     while(!infile.eof())
     {
          std::string temp;
          std::getline(infile,temp);
          std::cout << temp <<std::endl;
          if(temp.find("[MQ_") != std::string::npos)
          {
               if(temp.find("DS") == std::string::npos)
               {
                    correct = true;
               }
          }
          else if(temp.find("MBOBufferInFileEnable") != std::string::npos)
          {
               ofile << MBOBufferInFileEnable=NO;

          }
else if(temp.find("TransferAllMBOinQueue2DiskBufferEnable") != std::string::npos)
          {
               ofile << TransferAllMBOinQueue2DiskBufferEnable=NO;

          }
     }
     system("pause");
     return 0;
}
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
Comments: