Sizeof Operator?
Is the "sizeof" operator, a pre-compiler function thingy? (Does it change it to the size of the array upon compile?)
I use "sizeof" always, when dealing with global arrays. (Incase I ever change it's size) Is this any performance loss? Or is it all replaced when compiled? |
Re: Sizeof Operator?
I was told that it is a normal operator and not a pre-compiler directive.
|
Re: Sizeof Operator?
compiler will calculate all operators which can be calculated when compiling.
such as 1<<10 sizeof ... so when compiled, "sizeof x" appears as a const so don't worry about the performance at run-time |
| All times are GMT -4. The time now is 05:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.