Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
単純に int を渡すと、次の警告が表示されます。
警告: 互換性のない整数からポインターへの変換は、int 型のパラメーターに int を渡します *
言い換えれば、それは何ですかint *
int *
これには、整数変数自体ではなく、整数変数のアドレスが必要です。&演算子を使用して、変数のアドレスを取得できます。したがって、次のコードが機能します。
&
int i = 10; wait( &i );