結果不到5分鐘就加好了...
測試碼:

#define _STLP_USE_STATIC_LIB
#include <iostream>
#include <fstream>
#include <string>

void SaveDatFile( const std::wstring path )
{
    std::ofstream fIn;
    fIn.open(path.c_str(), std::ios_base::out);
    if (fIn.good())
    {
        for (int i=0;i<1000;i++)
        {
            fIn << i << std::endl;
        }
    }
    fIn.close();
}

int main()
{
    SaveDatFile(L"C:\\Users\\damody\\Downloads\\2D絕對武力CS\\2D絕對武力CS\\妖境.txt");
}


===================================

改法:

src\details\fstream_win32io.cpp
line 217~299 char OPEN 版本
新增 wchar_t 版本在 300行

stlport\stl\_fstream.h
line 591
新增 wchar_t open函數

編譯參數:configure msvc9 --with-static-rtl

下載檔案:http://damody.googlecode.com/files/fstream.zip

arrow
arrow
    全站熱搜

    讓地獄深紅的天亮 發表在 痞客邦 留言(0) 人氣()