タグ

Cに関するKshi_Kshiのブックマーク (3)

  • Deep C

    Programming is hard. Programming correct C and C++ is particularly hard. Indeed, both in C and certainly in C++, it is uncommon to see a screenful containing only well defined and conforming code.Why do professional programmers write code like this? Because most programmers do not have a deep understanding of the language they are using.While they sometimes know that certain things are undefined o

    Deep C
  • strtok

    文字列を区切り文字で分解する 【書式】 #include <string.h> char *strtok(char *s1, const char *s2); 【説明】 分解対象文字列 s1 を、文字群 s2 中の文字を区切りに字句(トークン)に分解します。 次のような手順で strtok() を用いて文字列をトークンに分解することが出来ます。 最初の呼び出しでは s1 には分解対象の文字列を指定します。トークンがあれば、strtok() はトークンへのポインタを返却します。 2回目以降の呼び出しでは s1 に NULL を指定します。分解できるトークンがあるうちは、strtok() はトークンへのポインタを返却します。 トークンがなくなると strtok() は NULL を返却します。 strtok() はトークンへのポインタを返却しながら、分解対象文字列 s1 中の区切り文字に空文字

  • C言語入門(5)

    関数の調べ方 プログラマーといえども,全ての関数の使い方を覚えているわけではない. 慣れない関数を使うときはマニュアルを引きながらコーディングするのが普通. NEXTSTEP には,オンラインマニュアルが整備されている. これを使うと,関数を検索して,必要なヘッダファイル(#include),呼び出し方,説明等を簡単に得ることができる. (ただし,英語) /NextApps/Librarian.app を使ってみよう. Librarian.app のシェルフに,ファイルビューアから /NextLibrary/Documentation/ManPages をドラッグして配置する. C言語の関数リストは,intro を検索し,introduction of C library functions をクリックすることで得られる. 関数に,引数として配列を渡す方法 C言語では関数の引

    Kshi_Kshi
    Kshi_Kshi 2011/10/04
    関数で配列を扱う(C言語)
  • 1