如何在visual studio调试器命令行参数中包含百分比字符? [英] How to include the percent character in the visual studio debugger command line arguments?
问题描述
我想在Visual Studio 2010 SP1中使用如下参数调试程序:file-%04d.jpg。
I want to debug a program in Visual Studio 2010 SP1 with an argument like: "file-%04d.jpg".
但是在项目属性> 配置属性> 调试> 命令参数更改%04,结果为 argv [1]
设置为:file- [some unknown symbol] d.jpg。
But entering this string in Project Properties > Config Properties > Debugging > Command Arguments changes the "%04", resulting in argv[1]
being set to: "file-[some unknown symbol]d.jpg".
字符百分比似乎是被解释为逃避序列,这不是我想要的。这不会发生在2008年。
The percent character seems to be interpreted as an escape sequence which is not what I want. This does not happen in 2008.
推荐答案
%xx似乎被解释为ascii转义。
所以%25应该在参数列表中产生一个真正的%字符。
%xx seems to be interpreted as an ascii escape. So %25 should result in a real % character in the argument list.
这篇关于如何在visual studio调试器命令行参数中包含百分比字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!