我刚从 Vala 开始,我尝试制作一个简单的程序来询问两个输入:
- 指定循环度的 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)
非常简单的程序的 pastebin 位于此处。
这是一个片段:
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
}
您能告诉我该怎么做,以及一些提示吗?谢谢。