6 ms·
> asterisk is inexplicably used both to declare a pointer and a COMPLETELY different operation of dereferencing a pointer. This is the most confusing concept o
by tealpod 11mo ago
> asterisk is inexplicably used both to declare a pointer and a COMPLETELY different operation of dereferencing a pointer.
This is the most confusing concept of pointers. I feel this could have been easily avoided with different character like ~ or ^ or other.
- 1718627440 11mo agoWhy? In C all the declarations work like that: float * (*foo(int *)) (int); foo is something, that can be called with an 'int *', which results in a pointer to something that can be called with an 'int', which results in something which can be dereferenced, which is a float.