本文へスキップ
onsuggest
ログイン
記事 en

Initialize Struct to Zero in C

情報源: /dev/null ·

DISCLAIMER: Keep in mind that at the time of writing this blog post, i am still learning about C programming language and lack experience to validate the information from the low-level perspective. This blog post act like my public notes, which might be wrong. When i read this article about self-pipe trick, i found this code snippet: ... struct sigaction sa; memset(&sa, 0, sizeof(sa)); ... That make me wonder, do we need to use memset() to initialize the struct to 0?

キーボードショートカット

前の発見
←P
次の発見
→N
いいね
L
合わない
X
保存
S
このヘルプを表示
?
閉じる
Esc

ショートカットは発見ページで使えます。