TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JAMIE KOWINSKY
from: THOMAS MAEDER
date: 1997-11-01 10:41:00
subject: sizeof() question

JK> Now my question is, does the compiler treat "sizeof(StructName);" as
JK> constant?  During compile time will it lookup the size of the stuct
JK> use that number instead of calculating the size of the stucture each
Yes. There's no run time overhead for using sizeof.
Thomas
---
 þ MM 1.0 #0113 þ Wanted: Rich man with poor eyesight & lousy lawyer
---------------
* Origin: McMeier & Son BBS (2:301/138)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.