我正在尝试编写一个程序,我必须使用文件重定向来从另一个文本文件中输入 cin 文本。我看到我应该能够使用 .\a.exe < inputFile.txt,但无论出于何种原因,我的 Windows 终端都无法识别“<”。这是我得到的错误:
At line:1 char:14
+ .\a.exe 1000 <input1L.txt
+ ~
The '<' operator is reserved for future use.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : RedirectionNotSupported
我不知道为什么它无法识别它,我也不知道如何解决它。