diff --git a/cp/main.cpp b/cp/main.cpp index a3b928a..d21b3dd 100644 --- a/cp/main.cpp +++ b/cp/main.cpp @@ -68,7 +68,6 @@ int main(int argc, char * args[]) std::string x = args[1]; wstr.resize(x.size() + 1); size_t convertedChars = 0; - mbstowcs_s(&convertedChars, &wstr[0], x.size() + 1, x.c_str(), _RUNCATE - DeleteFileA(args[1]); + mbstowcs_s(&convertedChars, &wstr[0], x.size() + 1, x.c_str(), _TRUNCATE); return 0; } \ No newline at end of file diff --git a/cp/test.txt b/cp/test.txt new file mode 100644 index 0000000..e8c465a --- /dev/null +++ b/cp/test.txt @@ -0,0 +1 @@ +this is only a test \ No newline at end of file diff --git a/vcppbuild.bat b/vcppbuild.bat index adb5a07..4adac31 100644 --- a/vcppbuild.bat +++ b/vcppbuild.bat @@ -12,6 +12,11 @@ if exist "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" ( call "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 goto compile ) +if exist "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" ( + call "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86 + goto compile +) + :compile cl.exe /MD /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Gm- /EHsc /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /I"..\ext\include" %1.cpp %2 del %1.obj \ No newline at end of file