我剛纔在瓦拉開始的時候,我試圖做一個簡單的程序,要求兩個輸入:調用方法時出現這種錯誤是什麼意思?
- 指定一個週期程度的int;和
- 包含I/R的字符,用於迭代或遞歸過程。
就在編譯之前,我得到這個錯誤:
test0.vala:8.5-8.16: error: Access to instance member `test0.test_exec' denied
test_exec(q);
^^^^^^^^^^^ //the entire statement
Compilation failed: 1 error(s), 0 warning(s)
了非常簡單的程序的引擎收錄位於here。
這裏有一個片段:
public static void main(string[] args)
{
stdout.printf("Greetings! How many cycles would you like? INPUT: ");
int q=0;
stdin.scanf("%d", out q);
test_exec(q);
}
public void test_exec(int q)
{
//method code here
}
能否請您賜教做什麼,以及有什麼祕訣?謝謝。
@Rek:歡迎使用代碼審查。此網站用於審覈工作代碼,而不是修復損壞的代碼。請參閱常見問題解答:http://codereview.stackexchange.com/faq – 2011-03-25 15:43:39