G
goose
Andrew said:x += (sizeof q) - 3;
would be an appropriate use of parentheses in this situation, IMHO, and
Not really, see Frederick Gothams post upthread on the precedence
rules for sizeof.
goose,
Andrew said:x += (sizeof q) - 3;
would be an appropriate use of parentheses in this situation, IMHO, and
Not really, see Frederick Gothams post upthread on the precedence
rules for sizeof.
Andrew said:x += (sizeof q) - 3;
would be an appropriate use of parentheses in this situation, IMHO, and
would likely be the form I'd use. (I very rarely use sizeof outside of
malloc and friends, though.)
Joe said:How many messages in this thread?
Assuming y an expression, 'sizeof y' is correct. sizeof(y) is to be
shunned.
It makes sizeof look like a function. It is not.
Assuming T a type, 'sizeof (T)' is to be preferred over 'sizeof(T)'
which looks like a function. 'sizeof T' is an error of course.
So do macros what?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.