Skip to content
Snippets Groups Projects
Commit c2922026 authored by march230's avatar march230
Browse files

Completed part 2

parent 68997a62
No related branches found
No related tags found
1 merge request!1Merge
SOURCE=Häst.txt
SOURCE=?Häst?.txt
all: cpp-linux.txt win32.txt cpp-win32.txt
all: cpp-linux.txt win32.txt cpp-win32.txt qt.txt
ls -lh $^
win32.txt: win32.exe $(SOURCE)
......
No preview for this file type
/* In case the C++-compiler is too old for std::filesystem */
#if __has_include(<filesystem>)
#include <filesystem>
......@@ -10,8 +11,13 @@ namespace filesystem = std::experimental::filesystem;
int main(int argc, char** argv)
{
assert(argc==2); /* argv[1] is the destination file */
/* Your code here */
return 0;
#if defined(MSC_VER) || defined(__MINGW32_)
filesystem::copy(L"马Häst马.txt", argv[1]);
return 0;
#else
filesystem::copy(L"马Häst马.txt", argv[1]);
return 0;
#endif
}
#include <assert.h>
#include <QTextCodec>
#include <QFile>
int main(int argc, char** argv)
{
assert(argc==2); /* argv[1] is the destination file */
/* Your code here */
/* Make sure we use UTF-8 for file names; this is needed for the IDA labs */
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
assert(argc==2);
QFile::copy("马Häst马.txt", argv[1]);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment