I'm sure that this cannot be done using conventional arrays. The way I would do it would be to use a linked list. That way, the years could be in any order, and years could be missed out if required. class node { private : int year; int value; node * pointToPrevious; public : node() { } node(int y, int v, node * p) { year = y; value = v; pointToPrevious = p; } }; For fuller notes on linked lists as I teach it, please email me : simon.cornish@tesco.net Regards Simon