Jan 30
Quick quiz: What is the behavior of the following code:
#include <stdio.h>
int main(int argc, char* argv[])
{
try
{
*((char*) 0) = 1;
}
catch (...)
{
printf("Caught exception.\n");
}
return 0;
}
The answer is below the fold.
Read the rest of this entry »
Jan 29
To retrieve the list of macros that gcc predefines, execute the following command:
gcc -E -dM - < /dev/null
Jan 11
While I had originally planned on stretching out my Implementing IXmlWriter series of posts into at least three or four more posts, I’ve decided to end it here. Here is a list of the posts in the series:
Off the top of my head, here are a few things left to implement:
- Processing instructions
- Doc type declarations
- CDATA declarations
- Entity references
- Character entities
- Character encodings (e.g. UTF-8, UTF-16, etc.)
- Robust error handling, such as throwing an exception if WriteAttribute() is called with an illegal character
Update: 2007-07-11 10:58 PM: Microsoft’s XmlLite provides all this and more for Windows developers.
Jan 10
Today I will add support for writing the generated XML to a C++ stream to last time’s IXmlWriter.
Read the rest of this entry »
Recent Comments