私は Vala を使い始めたばかりで、2 つの入力を要求する簡単なプログラムを作成しようとしました。
- 循環度を指定する int。と
- 反復プロセスまたは再帰プロセスの I / R を含む char。
コンパイルする直前に、次のエラーが発生しました。
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)
非常に単純なプログラムのペーストビンは、ここにあります。
ここにスニペットがあります:
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
}
どうすればいいのか、コツなど教えていただけないでしょうか。ありがとう。