Считайте файл и записывайте его на вывод немедленно, байт за байтом, проверяя на конец файла и вычислительное время
Как мы можем это закодировать
The main method will: Request the input file name. Request the output file name. Request the program "mode" (see below) 0 -- means the file(s) will be processed in character-by-character mode (see #2 below). 1 -- means the file(s) will be processed in line-by-line mode (see #3 below). The character-by-character method will: Open a simple text file. Read the file and write it to output immediately, byte-by-byte, testing for the end of file marker. Close the files. Compute and display the wall-clock time (the "real-world" time) The line-by-line method will: Open a simple text file (same file as 2 above) and an output file. Read the file and write it to output immediately, line-by-line, testing for the end of file marker. Close the files. Compute and display the wall-clock time (the "real-world" time) Run the program, use both modes. Compare the two results and explain the differences, if any. If none, explain why.
Что я уже пробовал:
The main method will: Request the input file name. Request the output file name. Request the program "mode" (see below) 0 -- means the file(s) will be processed in character-by-character mode (see #2 below). 1 -- means the file(s) will be processed in line-by-line mode (see #3 below). The character-by-character method will: Open a simple text file. Read the file and write it to output immediately, byte-by-byte, testing for the end of file marker. Close the files. Compute and display the wall-clock time (the "real-world" time) The line-by-line method will: Open a simple text file (same file as 2 above) and an output file. Read the file and write it to output immediately, line-by-line, testing for the end of file marker. Close the files. Compute and display the wall-clock time (the "real-world" time) Run the program, use both modes. Compare the two results and explain the differences, if any. If none, explain why.
Мой вопрос заключается в том, куда я помещаю свои часы времени, а второй вопрос-как я открою этот файл в моем блоке else, потому что он дает мне ошибку компиляции.
NotPolitcallyCorrect
Чем это отличается от того же неопределенного" не работает " не-вопрос, который вы задавали ранее об одном и том же?