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

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

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

閱讀全文

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

熱點內容
python集合中插入元素 瀏覽:170
oms會檢測編譯程序嗎 瀏覽:793
開考前命令話 瀏覽:354
安卓鍵盤怎麼設置虛擬按鍵 瀏覽:93
蘋果筆記本電腦怎麼登錄雲伺服器 瀏覽:932
為什麼安卓手機比蘋果耐寒 瀏覽:718
滴滴出行app什麼時候恢復正常下載 瀏覽:560
python中turtle繪制圖形並保存 瀏覽:565
php獲取上個月時間戳 瀏覽:574
怎麼設置oppo手機app密碼 瀏覽:360
jra格式下載哪個文件夾 瀏覽:658
蘋果手機怎麼刪除手機上的app 瀏覽:343
單片機熱敏電阻溫度控制 瀏覽:82
方舟私人伺服器的服主怎麼刷物資 瀏覽:454
重裝系統提示加密鎖 瀏覽:625
為什麼下載的音樂要加密 瀏覽:964
因為沒有打開的文檔所以這一命令無效 瀏覽:720
電腦文件夾數據損壞 瀏覽:716
java打賞源碼搭建 瀏覽:365
pdf32 瀏覽:256