_wfreopen Works On C:/path/file.txt But Not With C:\path\file.txt?
TCHAR finalpath[MAX_PATH]; GetCurrentDirectory(MAX_PATH,finalpath); TCHAR filename = TEXT("\\lista.txt"); wcscat(finalpath,filename); wprintf(L"List will be saved to %s", finalpath);
So this basically confirms me that finalpath is indeed c:\somepath\lista.txt
If i just change it to
everything then works fine, why and how can i make it accept my finalpath arg?
You don't use the TEXT macro with variables. I'm surprised that
_wfreopen(TEXT(finalpath),TEXT("w"),stdout); even compiles.
- → Comparing two large files are taking over four hours
- → Setting JSON node name to variable value
- → Compiling GLUT using Emscripten
- → Evaluate check box from a scanned image in node.js
- → Find an easy web server framework for mobile game
- → my https C++ code doesn't work on some sites (binance)
- → Error while opening pivx wallet on ubuntu
- → Why sending a POST by AJAX is interpreted by the HTTP Server as OPTIONS and sending by CURL is effectively a PUT?
- → Python reading in one line multiple types for a calculator
- → How do I properly pass an argument to a function
- → Accessing Websql database with Qt
- → Using Mysql C API for c++ codes
- → How do I set constants at run-time in a c++ header file, imported through Cython?