Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used to have the exact same confusion until I reread K&R just last month.

The idea behind int foo; is that: foo is an int. That is to say: typeOf(foo) == int. So you can still think of as the dereferencing operator.

Personally I would prefer int& foo; since pointers are complicated enough already without the indirection.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: