> I would like my program to output the following: > ----------------- > Header Section > header.ID (5348h = "HS") > ... > ----------------- Wouldn't it be more direct to use Blockwrite(<file>,header.ID,sizeof(header.ID)); That would make it robust against changes of ID size and would avoid the many type castings.