Archive for the ‘C++’ Category.
8th January 2008, 06:30 pm
I’m really looking forward to QtConcurrent which will be in Qt 4.4; so I downloaded a Qt snapshot to try it out.
You can download all of the example code I wrote here, Qt Concurrent Examples
Continue reading ‘Multi-Threaded Programming with QtConcurrent’ »
7th January 2008, 07:38 pm
I finally got around to writing a major mode for Qt .pro and .pri files. It doesn’t provide any indenting features; only font locking.
Just load it up and add the following to your .emacs
(require ‘qt-pro)
(add-to-list ‘auto-mode-alist ‘(“\\.pr[io]$” . qt-pro-mode))
Get it here qt-pro.el
4th January 2008, 07:50 pm
I ran across something weird the other day. I had assumed that the return type of an overriding function must be identical to the function that it is overriding. The C++ Standard allows one specific exception to this rule that could possibly come in handy to save some unnecessary casting.
Continue reading ‘Covariant Return Types’ »
22nd September 2002, 03:07 pm
5×5 Grid of randomly lit and unlit boxes, clicking a box flips the boxes in a cross shape
around the box clicked
Uses SDL_Image and SDL_TTF
Press ~ to get to Console
lights.tgz
22nd September 2002, 02:58 pm
A Simple SDL Demo that uses Hardware Acceleration and Double Buffering to draw
three Sphere images on the screen and bounce them around a bit.
It uses SDL_Image for loading the PNG file.
Copy and paste the source code to a file and compile it like this:
gcc -Wall -ansi -pedantic `sdl-config –cflags` -c bounce.c
gcc -Wall main.o -o main -lSDL_image -L/usr/X11R6/lib -L/usr/lib -lSDL -lpthread
Bounce.c