Everything I wish I knew when learning C
21–30 of 401 posts
Re: Everything I wish I knew when learning C
#22Is void main() Still non-standard in C?
Re: Everything I wish I knew when learning C
#23Re: Everything I wish I knew when learning C
#24Re: Everything I wish I knew when learning C
#25Re: Everything I wish I knew when learning C
#26Humm, actually, you can. But guess what ? Modification of the underlying data is an UB !
Re: Everything I wish I knew when learning C
#27Earlier quoted context omitted.
The way I got this to stick in my head was to always think of * as dereferencing, and tell myself that int *x; is declaring that the type of *x is int.
It's not just a memorization trick; that's exactly what the statement means. If you do int *x, y; You're saying that both *x and y are integers.
int* x, y.
Does somebody know?Re: Everything I wish I knew when learning C
#28Re: Everything I wish I knew when learning C
#29Decent article. A couple minor points: c89 or c99, not c98. Plain static variables aren't thread-safe by default, true, but there's also _Thread_local
Re: Everything I wish I knew when learning C
#30Earlier quoted context omitted.
It's not just a memorization trick; that's exactly what the statement means. If you do int *x, y; You're saying that both *x and y are integers.
... which is why I never understood why this is the convention rather than int* x, y. Does somebody know?