使用 system 函数 #include <iostream> #include<Windows.h> int main() { std::cout << "Hello World!\n"; system("WPFDocumentPrint.exe"); Shell