hypertown@lemmy.world to Programmer Humor@programming.dev · 5 months agoLife is hardlemmy.worldexternal-linkmessage-square29fedilinkarrow-up1491arrow-down120
arrow-up1471arrow-down1external-linkLife is hardlemmy.worldhypertown@lemmy.world to Programmer Humor@programming.dev · 5 months agomessage-square29fedilink
minus-squarehenfredemars@infosec.publinkfedilinkEnglisharrow-up48·edit-25 months agoMissing type or identifier. A const what? Also, I read that you have to assign a const when it is declared. Something doesn’t feel right about this statement.
minus-squarepipe01@programming.devlinkfedilinkarrow-up7arrow-down1·5 months agoAckshually you don’t need a type qualifier in C
minus-squareStatic_Rocket@lemmy.worldlinkfedilinkEnglisharrow-up7·edit-25 months agoWell, assuming you meant type specifier, at least not before C99. After that it is required. C23 explicitly states that a type specifier is required for all declarations. If you actually meant type qualifier, then no. That was never required.
Missing type or identifier.
A const what?
Also, I read that you have to assign a const when it is declared. Something doesn’t feel right about this statement.
const long pain = 1;
1L
void
Maybe…
const pain = Infinity
:any
Ackshually you don’t need a type qualifier in C
Well, assuming you meant type specifier, at least not before C99. After that it is required. C23 explicitly states that a type specifier is required for all declarations.
If you actually meant type qualifier, then no. That was never required.
Really? TIL.
Defaults to int if I’m not mistaken.
Huh?