lawless polymorph on Nostr: ok you know what's wrong with C. ` *foo = v; ` means "store the value v, which is an ...
ok you know what's wrong with C.
` *foo = v; ` means "store the value v, which is an integer, at the address pointed to by foo".
` int *foo = v; ` means "declare the pointer foo and give it the initial value v, which is a pointer to an integer".
these may look almost the same but the meaning is completely different.
Published at
2024-08-11 01:25:05Event JSON
{
"id": "652bb4eb47d446d86db18294ecf2128cce6dea291f053b827fc9d228da7631e0",
"pubkey": "c949aacafdf83f1a59584de6bdd99398a858f82e181ead7a9e380615935cea45",
"created_at": 1723339505,
"kind": 1,
"tags": [
[
"proxy",
"https://gamedev.lgbt/@typeswitch/112940777801207419",
"web"
],
[
"proxy",
"https://gamedev.lgbt/users/typeswitch/statuses/112940777801207419",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://gamedev.lgbt/users/typeswitch/statuses/112940777801207419",
"pink.momostr"
],
[
"-"
]
],
"content": "ok you know what's wrong with C.\n\n` *foo = v; ` means \"store the value v, which is an integer, at the address pointed to by foo\".\n` int *foo = v; ` means \"declare the pointer foo and give it the initial value v, which is a pointer to an integer\".\n\nthese may look almost the same but the meaning is completely different.",
"sig": "6ca66813734a54a98d303b53937c03ae76f87b42080da086278f8811f9529e7ef59228f752047c2fe8e31e3c8ae1fe511060d3250c534211615b2759152e6160"
}