August, 2004

  • the1's WebLog

    Programming in XSLT!

    • 1 Comments
    Not so long ago, I posted a programming challenge , and received solutions in many different languages. Just when I thought people had forgot about this, I got this one from Anton Triest . It was written in a programming language called ... (surprise...
  • the1's WebLog

    Generalize Smart Pointers in C++

    • 10 Comments
    After programming in C++ for a while, you will inevitably be introduced to the concept of “smart pointers” (or you will discover them on your own). These are pointers that know to automatically release the objects they point to when they ...
  • the1's WebLog

    Using template specialization in C++

    • 0 Comments
    We all know that C++ templates can be used to write generic code, e.g. template <typename T> class Array { … }; Then we can use the same template to generate code for different template parameters. This is called instantiation...
  • the1's WebLog

    Using C++ Member Function Pointers

    • 1 Comments
    I don't know about you, but the C++ syntax for member function pointers always eludes me. Every time I would spend half an hour or more deciphering MSDN to get the exact syntax, only to completely forget it the next time. Oops. I can think of three...
  • the1's WebLog

    How Would You Get the Count of an Array in C++?

    • 0 Comments
    The question is simple: given a C++ array (e.g. x as in int x[10] ), how would you get the number of elements in it? An obvious solution is the following macro ( definition 1 ): #define countof( array ) ( sizeof ( array )/ sizeof ( array...
Page 1 of 1 (5 items)