導航:首頁 > 源碼編譯 > 此函數不能編譯為託管函數

此函數不能編譯為託管函數

發布時間: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]);
網路上自己查

閱讀全文

與此函數不能編譯為託管函數相關的資料

熱點內容
廣州程序員薪資 瀏覽:888
win7命令提示符輸入 瀏覽:591
關於程序員的故事 瀏覽:482
吃雞伺服器是什麼樣的 瀏覽:19
為什麼pspice沒有單片機 瀏覽:5
高數第六版下冊答案pdf 瀏覽:903
sm3演算法實現java 瀏覽:673
只有程序員才懂的笑話 瀏覽:265
php開發app介面源碼 瀏覽:12
加密狗寶寶 瀏覽:237
單片機搶答器的原理 瀏覽:928
百利達體脂儀可以用什麼app連接 瀏覽:226
伺服器2016自動備份怎麼取消 瀏覽:844
dos攻擊命令大全 瀏覽:842
夢世界伺服器怎麼擴大領地 瀏覽:972
解壓breathe 瀏覽:437
webview調用java 瀏覽:352
android待機流程 瀏覽:860
python直接退出程序 瀏覽:852
百戰程序員收費標准 瀏覽:778