extractor C++ program