To validate #include, you must declare #define preprocessor directive. After these variable is declared, check for its existence by using #ifdef or #ifndef directive. For example,
// File1.cpp
#ifndef FILE1
#define FILE1
// your codes here...
#endif
//MainFile.cpp
#include File1.cpp
// your codes here...
#ifdef FILE1
// codes for file1.cpp here
#else
// codes here if file1.cpp is not included
#endif