C言語で、配列とポインタは明確に別物だ。同じものだとする誤解が生じるのは、「同じ記法で使える」という話を、「同じもの」と間違った説明をしちゃってる解説なんかが悪い。 例えばPython言語で、data[0]と書いた場合、dataがリストなら、それはリスト ...
In our first part on pointers, we covered the basics and common pitfalls of pointers in C. If we had to break it down into one sentence, the main principle of pointers is that they are simply data ...
C言語を学んでいると、通常のポインタに慣れてきたころに int **p や char **argv のような「ポインタのポインタ」が登場します。 最初はかなり分かりにくく見えますが、実際のC言語プログラミングでは重要な場面でよく使われます。 この記事では、ポインタ ...