Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用此代码在 notepad++ 中编译和运行许多 .c 文件
NPP_SAVE g++.exe -g "$(FULL_CURRENT_PATH)" a
现在我想要的是每次编译和运行后,也会向程序发送一个输入。像下面的东西
NPP_SAVE g++.exe -g "$(FULL_CURRENT_PATH)" a 28 10 1985 //this is the input to the program a
我有很多 .c 文件来检查它们在提供日期时是否给出正确的输出。
使用 nppexec 从文件重定向输入的解决方案是使用 cmd
cmd /c g++ -o $(NAME_PART).exe $(FILE_NAME) && $(CURRENT_DIRECTORY)\$(NAME_PART).exe < input.txt