为什么数组找不到? [英] why array can not find?
问题描述
当我将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屋!