C++ dig for windows在cmd中工作,但它不';不在系统中工作

C++ dig for windows在cmd中工作,但它不';不在系统中工作,c++,c,dig,C++,C,Dig,dig for windows在cmd中工作,但在system()中不工作 这是cmd: 这是我的代码: system(" \"C:\\Windows\\System32\\dig.exe google.com\" "); 以及结果: 要么将所有反斜杠加倍,要么将其改为正斜杠。是否要键入system(“\C:\Windows\System32\dig.exe google.com”)而不是系统(“C:\Windows\System32\dig.ex

dig for windows在cmd中工作,但在system()中不工作

这是cmd:

这是我的代码:

system("  \"C:\\Windows\\System32\\dig.exe google.com\"  ");
以及结果

要么将所有反斜杠加倍,要么将其改为正斜杠。是否要键入
system(“\C:\Windows\System32\dig.exe google.com”)
而不是
系统(“C:\Windows\System32\dig.exe google.com”)?可执行文件的正确路径是
C:\Windows\System32\dig.exe
吗?我想在system()@h0r53中使用“dig google.com”是否确实是带有该后缀的
dig.exe