Search   Feed   Browse   Add
Feed items 1 - 5 of 5 for March 2008

Why do structures get tag names even if there is a typedef - March 27, 2008

As we noted last time, structure tags are different from the typedef name as a historical artifact of earlier versions of the C language. But what about just leaving out the name entirely typedef struct ... XYZ; One problem with this approach is that it becomes impossible to make a forward reference to this structure because it has no name. For example, if you wanted to write a prototype for a function that took one of these structures, and you could not be sure that the header file...
http://blogs.msdn.com/oldnewthing/archive/2008/03/27/8338530.aspx

Why are structure names different from their typedef names - March 26, 2008

In Windows header files, many structures are declared like this: typedef struct tagXYZ ... XYZ; typedef struct _XYZ ... XYZ; there are other variations, too Why is the structure name different from typedef name This is a holdover from very early versions of the C language where structure tags, union tags, and typedefs were kept in the same namespace. Consequently, you couldn't say typedef struct XYZ ... XYZ;. At the open brace, the compiler registers XYZ as a structure tag...
http://blogs.msdn.com/oldnewthing/archive/2008/03/26/8336829.aspx

What's the difference between int and INT, long and LONG, etc - March 25, 2008

When you go through Windows header files, you'll see types with names INT, LONG, CHAR, and so on. What's the difference between these types and the uncapitalized ones Well, there isn't one any more. What follows is an educated guess as to the story behind these types. The application binary interface for an operating system needs to be unambiguous. Everybody has to agree on how parameters are passed, which registers are preserved, that sort of thing. A compiler need only enforce the...
http://blogs.msdn.com/oldnewthing/archive/2008/03/25/8334558.aspx

What's the difference between the COM and EXE extensions - March 24, 2008

Commenter Koro asks why you can rename a COM file to EXE without any apparent ill effects. (James MAstros asked a similar question, though there are additional issues in James' question which I will take up at a later date.) Initially, the only programs that existed were COM files. The format of a COM file is... um, none. There is no format. A COM file is just a memory image. This "format" was inherited from CPM. To load a COM file, the program loader merely sucked the file into memory...
http://blogs.msdn.com/oldnewthing/archive/2008/03/24/8332730.aspx

Why can't I convert a time zone abbreviation into a time zone - March 7, 2008

Public Service Announcement Daylight Savings Time begins this weekend in most parts of the United States. Suppose you have a string of the form "Thu Mar 27 03:46:20 CST 2003". How can you parse this into something your program can manipulate, like say a SYSTEMTIME or a FILETIME Basically, you can't in the general case. The time zone abbreviation CST is ambiguous. It could mean U.S.Canada Central Standard Time, Australian Central Standard Time, China Standard Time, or Cuba Summer...
http://blogs.msdn.com/oldnewthing/archive/2008/03/07/8080060.aspx
Available Archives
- February (2 items)
- March (5 items)
- April (2 items)
- May (5 items)
- June (1 item)
Sponsored Links
© 2008 FeedCapsule.com  |  Contact