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

My first programming language where I used pointers was 68000 and they were easy for me to grasp, but for some reason it was harder when I started using C and everytime I get back to C or C++ I need a little refresher.

For me it is the syntax used by C for pointers that makes it confusing.



> For me it is the syntax used by C for pointers that makes it confusing.

Personally I don't see much difference between * (C way), ^ (Pascal way) or ref (Algol way).

Or do you mean the declaration order ?

int* ptr; (right to left)

ptr = ^Integer /ref int ptr (left to right)


Yes, it is probably the declaration order which confuses me.




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

Search: