VS2013中运行C++程序 提示未声明的标识符 10
以下CLR控制台程序在运行时提示错误1errorC2065:“names,weights”:未声明的标识符我是在Visualstudio2013中运行的,请高手帮忙分析下...
以下CLR控制台程序在运行时提示
错误 1 error C2065: “names,weights”: 未声明的标识符
我是在Visual studio 2013中运行的,请高手帮忙分析下啊,我找了半天都有发现哪里有错误啊。
#include "stdafx.h"
using namespace System;
int main(array<System::String^> ^args)
{
array<String^>^ names = { "XXXXXXXXX", "BBBBBBBBB", "CCCCCCCCCC" };
array<int>^ weights= { 110, 14, 85 };
Array::Sort(names,weights);
for each(String^ name in names)
Console::Write(L"(0,10)", name);
Console::WriteLine();
for each(int^ weight in weights)
Console::Write(L"(0,10)", weight);
Console::WriteLine();
return 0;
} 展开
错误 1 error C2065: “names,weights”: 未声明的标识符
我是在Visual studio 2013中运行的,请高手帮忙分析下啊,我找了半天都有发现哪里有错误啊。
#include "stdafx.h"
using namespace System;
int main(array<System::String^> ^args)
{
array<String^>^ names = { "XXXXXXXXX", "BBBBBBBBB", "CCCCCCCCCC" };
array<int>^ weights= { 110, 14, 85 };
Array::Sort(names,weights);
for each(String^ name in names)
Console::Write(L"(0,10)", name);
Console::WriteLine();
for each(int^ weight in weights)
Console::Write(L"(0,10)", weight);
Console::WriteLine();
return 0;
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询