帮助我的项目%ipcode% [英] Help With My Project %ipcode%
本文介绍了帮助我的项目%ipcode%的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使这段代码在c ++中运行就像在Batch中一样。由于某种原因,它不会使用%ipcode%。所以我无法输入ip'以查看是否有在线。
在c ++中它是这样的
How do I make this code work in c++ Like it works in Batch. For some reason it wont use %ipcode%. So I cant input ip''s to see if there online.
In c++ its like this
展开 | 选择 | Wrap | 行号
推荐答案
如何使此代码在c ++中运行就像它在批处理中一样。由于某种原因,它不会使用%ipcode%。所以我无法输入ip'以查看是否有在线。
在c ++中它是这样的
How do I make this code work in c++ Like it works in Batch. For some reason it wont use %ipcode%. So I cant input ip''s to see if there online.
In c++ its like this
展开 | 选择 | Wrap | 行号
这里的问题是对system()的两次调用都设置了一个独立的cmd.exe独立运行。因此,第二个电话不能看到您在第一次调用时提示并设置的%ipcode%变量的值。
我建议使用C代码提示输入ipcode,然后将答案格式化为第二个命令所以只调用一次system()。
The trouble here is that the two calls to system() each set up a separate, independent run of cmd.exe. So, the second call cannot "see" the value of the %ipcode% variable you prompted for and set during the first call.
I would suggest using C code to prompt for the ipcode, then format the answer into the second command and so call system() just once.
这里的麻烦是两次调用system()各自设置一个单独的,独立运行cmd.exe。因此,第二个电话不能看到您在第一次调用时提示并设置的%ipcode%变量的值。
我建议使用C代码提示输入ipcode,然后将答案格式化为第二个命令所以只调用一次system()。
The trouble here is that the two calls to system() each set up a separate, independent run of cmd.exe. So, the second call cannot "see" the value of the %ipcode% variable you prompted for and set during the first call.
I would suggest using C code to prompt for the ipcode, then format the answer into the second command and so call system() just once.
哦,好的电话。我完全错过了第一次通话中发生的事情...
很好的抓住,ravenspoint。
Ooooh, good call. I totally missed what was going on in the first call...
Nice catch, ravenspoint.
这篇关于帮助我的项目%ipcode%的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文