fork download
  1. #include <iostream>
  2. #include <locale>
  3. #ifdef _WIN32
  4. #include <fcntl.h>
  5. #include <io.h>
  6. #endif
  7. int main()
  8. {
  9. #ifdef _WIN32
  10. _setmode(_fileno(stdout), _O_WTEXT);
  11. #else
  12. std::locale::global(std::locale(""));
  13. #endif
  14.  
  15. const int R = 5;
  16. const int C = 3;
  17. wchar_t seat[R][C];
  18. for( int r=0; r<R; ++r )
  19. for( int c=0; c<C; ++c )
  20. seat[r][c] = L'□';
  21.  
  22. for( int r = 0; r < R; ++r)
  23. {
  24. for ( int c = 0; c < C; ++c)
  25. std::wcout << seat[r][c] << ' ';
  26. std::wcout << '\n';
  27. }
  28. }
Success #stdin #stdout 0.02s 4952KB
stdin
Standard input is empty
stdout
□ □ □ 
□ □ □ 
□ □ □ 
□ □ □ 
□ □ □