fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. #define MAX_PATH 100
  5.  
  6. int main() {
  7. wchar_t *WorkingDirectory = L"hello";
  8. wchar_t *File = L"world";
  9.  
  10. wprintf(L"Attempting to compress %ls%ls\n", WorkingDirectory, File);
  11.  
  12. wchar_t FileRawInput[MAX_PATH];
  13. wcsncpy(FileRawInput, WorkingDirectory, MAX_PATH);
  14. wcsncat(FileRawInput, File, MAX_PATH);
  15.  
  16. wchar_t bzipCompressedOutput[MAX_PATH];
  17. wcsncpy(bzipCompressedOutput, FileRawInput, MAX_PATH);
  18. wcscat(bzipCompressedOutput, L".bz2");
  19.  
  20. wprintf(L"Output of string bzip: %ls\n", bzipCompressedOutput);
  21. wprintf(L"Output of string raw: %ls\n", FileRawInput);
  22. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
Attempting to compress helloworld
Output of string bzip: helloworld.bz2
Output of string raw: helloworld