C/C++ Programming

This page provides source code that solves some common programming problems.
All the code has been written, compiled and tested using Microsoft Visual C++ 5.0.


Date Parsing

This code accepts a single free format string that is intended to represent a date,
perhaps entered by a user. It will then attempt to convert that string into a valid
internal representation of a date, that is, a time_t value.

For example,
These following constants govern the behaviour when an ambiguous date is provided:
See the comments in the source code for more information.


Bit Manipulation

This code makes it possible to set or get a sequence of up to 32 bits in a string of
unsigned characters, ie. bytes. The following two functions are available:


Return to Michael’s Home Page