如何在 Visual Studio 调试器命令行参数中包含百分比字符? [英] How to include the percent character in the visual studio debugger command line arguments?

查看:20
本文介绍了如何在 Visual Studio 调试器命令行参数中包含百分比字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 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".

但是在 Project Properties > Config Properties > Debugging > Command Arguments 中输入这个字符串会改变%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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆