Either if your Sorter class was not created using the MFC Wizard, or if your Sorter class is not an MFC class, you will get that message. I used to face this problem myself. So, just add this statement as the first line in the Sort.cpp file:
#include "stdafx.h"
It should work after...