In the following code, there is a memory leak if Info::addPart1() is called multiple times by accident:
Info::addPart1()
typedef struct { }part1; typedef struct { }
Use a smart pointer such as boost:shared_ptr , boost:scoped_ptr is recommended to manage the raw pointer. auto_ptr is tricky to work with, you need pay attention to that.