Comment on Ask HN: In C, why is the * operator both reference and type casting?Comments−jey16y(Mentally replace all ^s with asterisks in the following:)I don't understand your C code. What is "(int foo^)" supposed to do? It looks almost like a cast, but "int foo" isn't a valid type in C. Maybe "(struct foo^)" or "(int^)"?−blintsonOP16yI wrote that wrong, my bad. I was copying from a call-by-value example from memory. Changed the following: *(int *foo)pointer_param /*changed to*/ *(int*)pointer_param = bar
Comments
(Mentally replace all ^s with asterisks in the following:)
I don't understand your C code. What is "(int foo^)" supposed to do? It looks almost like a cast, but "int foo" isn't a valid type in C. Maybe "(struct foo^)" or "(int^)"?
I wrote that wrong, my bad. I was copying from a call-by-value example from memory. Changed the following: