立即窗口是否提供了一种显示原始数组的好方法?

发布于 2024-09-28 10:15:57 字数 141 浏览 1 评论 0原文

我动态分配了一个数组,如下所示:

unsigned char **nonces=new unsigned char*[n_cases]

有没有办法在立即窗口中很好地打印出来?或者,让本地窗口正确显示它会很好。

I dynamically assigned an array as follows:

unsigned char **nonces=new unsigned char*[n_cases]

Is there a way to nicely print it out in the immediate window? Alternatively, it would be nice to make the locals window display it properly.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

靖瑶 2024-10-05 10:15:57

C 数组的标准问题,即使调试器也不知道它们有多长。您必须使用像 nonces[0],12 这样的监视表达式来告诉它。您用 C++/CLI 标记了这一点,这不是托管数组的问题:

array<array<unsigned char>^>^ nonces = gcnew array<array<unsigned char>^>(n_cases);
nonces[0] = gcnew array<unsigned char>(42);
// etc..

Standard problem with C arrays, not even the debugger can know how long they are. You have to tell it that with a watch expression like nonces[0],12. You tagged this with C++/CLI, it is not a problem with managed arrays:

array<array<unsigned char>^>^ nonces = gcnew array<array<unsigned char>^>(n_cases);
nonces[0] = gcnew array<unsigned char>(42);
// etc..
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文