タグ

2007年3月29日のブックマーク (2件)

  • ポインタ虎の巻~関数ポインタの使い方

    ポインタとして指すことのできるのは、通常のデータだけではない。プログラムの断片である関数でさえも、ポインタとしてポインタ変数に格納することができる。たとえば、ある条件に従って、足し算をするのか引き算をするのか変わる、というプログラムがあったとしよう。 int add( int a, int b ) { return a + b; } int sub( int a, int b ) { return a - b; } void main() { int cond; int x, y; ....... if( cond == 0 ) { printf( "result = %d\n", add( x, y ) ); } else if( cond == 1 ) { printf( "result = %d\n", sub( x, y ) ); } else { printf( "I do NO

    tanakaBox
    tanakaBox 2007/03/29
    かなり使えそう。
  • FreeBSD ハンドブック

    This translation may be out of date. To help with the translations please access the FreeBSD translations instance. trademarksFreeBSD は The FreeBSD Foundation の登録商標です。 IBM, AIX, OS/2, PowerPC, PS/2, S/390 および ThinkPad は アメリカ合衆国、その他の国、または両方における International Business Machines Corporation の商標です。 IEEE, POSIX および 802 は アメリカ合衆国における Institute of Electrical and Electronics Engineers, Inc. の登録商標です。 Red Ha

    tanakaBox
    tanakaBox 2007/03/29
    Linuxユーザーだけどブクマ。