第三方DLL库会导致ofstream不可以写入文件吗?

DLL 项目下面:

DLLclass.h

#ifndef WELDING_SEAM_H
#define WELDING_SEAM_H
#ifdef WELDING_SEAM_EXPORTS
#define WELDING_SEAM_API __declspec(dllexport)
#else
#define WELDING_SEAM_API __declspec(dllimport)
#endif
class  DLLclass
{
public:

   DLLclass(const Array2D<double> & input)
  {
  }
DLLclass(std::string str)
{
}

  void WELDING_SEAM_API Implement(int a = 3, int b=2);

};

DLLclass.cpp

#include "DLLclass.h"
void  DLLclass::Implement (int a , int b)
{

}

EXE 项目下面:

UseDll.h

 class useDLL
{
Public:
    void  run(int a=1,int b=1);
}

UseDll.cpp

     #include "UseDll.h"
 #include "DLLclass.h"
 void useDLL::run(int a,int b)
 {
       DLLclass this_Dllclass("test');
         this_Dllclass.run(10,10):
 }

除非第三方库读写了这个文件没有关闭,或者第三方库引发了某个不安全操作导致杀毒软件阻止了你的程序。
你可以尝试写另外一个文件,或者加上点日志输出,看看程序是否还在运行