导航:首页 > 源码编译 > 此函数不能编译为托管函数

此函数不能编译为托管函数

发布时间:2022-08-25 19:49:45

1. VC参数为托管数组的函数用法.

定义一个 void OutputInformation(array <student^>^ Students);

函数主体:
void student::OutputInformation(array <student^>^ Students)
{
for(int i=0; i<5;i++)
{
OutputName(Students[i]);
OutputAge(Students[i]);
OutputEnglishScore(Students[i]) ;
OutputProgrammingScore(Students[i]) ;
}
}

void student::OutputName(student^ abc)
{
Console::Write("student Name: "+ Name);
Console::WriteLine();
}

void student::OutputAge (student^ abc)
{
Console::Write("Age: " + Age);
Console::WriteLine();
}

void student::OutputEnglishScore(student^ abc)
{
Console::Write("English Score: " + EnglishScore );
Console::WriteLine();
}

void student::OutputProgrammingScore (student^ abc)
{
Console::Write("Programming Score: " + student::ProgrammingScore );
Console::WriteLine();
}
引用函数
array <student^>^ Students = gcnew array<student^> (5) {Jack , Mike, John, Mok, Sophia};
OutputInformation (Students[5]);
网络上自己查

阅读全文

与此函数不能编译为托管函数相关的资料

热点内容
邮箱设置域名服务器错误什么意思 浏览:669
硬盘解压失败受损蓝屏 浏览:652
应用和服务器是什么意思 浏览:485
程序员需要知道的网站 浏览:713
微信支付页面加密码怎么加 浏览:57
网络加密狗问题 浏览:698
cnc曲面编程实例 浏览:170
什么app零粉分发视频有收益 浏览:164
肯尼亚程序员 浏览:640
新科源码 浏览:661
如何判断服务器有没有带宽 浏览:43
天正建筑批量删除命令 浏览:96
cad最下面的一排命令都什么意思 浏览:456
pythonimportcpp 浏览:852
W10的系统怎么给U盘加密 浏览:372
华为手机代码编程教学入门 浏览:764
和彩云没会员怎样解压 浏览:636
androidimageview保存 浏览:389
新买店铺什么服务器 浏览:886
文件夹能直接刻录吗 浏览:495