为什么数组找不到? [英] why array can not find?

查看:143
本文介绍了为什么数组找不到?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将vs2011预览更新为vs2011 beta时,我发现arrry无法在c ++ winrt dll中找到。有一个错误:数组不是模板。在vs2011预览中,我使用数组将c#中的byte []传递给c ++,如下所示:

when I update vs2011 preview to vs2011 beta, I found arrry can not be  found in c++ winrt dll. There is a error: array is not a template. In vs2011 preview I use array to pass byte[] from c# to c++ like this:

void TestSocket :: Send(array< unsigned char> ^ buff);

推荐答案

您好,

您是否忘记包含< array>

并使用命名空间std;

Did you forget to include <array>
and using namespace std;

数组<>构造函数有两个参数类型和元素数量,例如这个数字&$ b $ n 数组< int,4> ai = {1,2,3};

The array<> constructor has two parameters type and number of elements, like this
 array<int, 4> ai = { 1, 2, 3 };

http://msdn.microsoft.com/en-us/library/bb983093(v = vs.110).aspx

祝你好运,

Jesse

Best regards,
Jesse


这篇关于为什么数组找不到?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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