1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

C言語ポインタの落とし穴

Last updated at Posted at 2021-08-11

次のような考えは 間違い です。

  • *変数名 とするとポインタとして扱えるから
    • 宣言は char *tmp
    • 使うときは *tmp

正解は、

  • ポインタ変数として使ときは*抜きのtmpとしてポインタ変数として使える
  • 変数宣言のときのアスタリスクと、それ以外のときのアスタリスクは全くの別物!!
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?