Both files
First thing: lack of comments.
Code:
using namespace std;
using std::ifstream;
This is a wee bit redundant.
Code:
FileException( std::string error, std::string file ):
strErrMsg(error), strFilename(file) {}
std::string strErrMsg;
std::string strFilename;
You are 'using namespace std', and you are still referencing the string class with the std:: prefix? Tsk, tsk, tsk.
int main( void )
This way you are explicitly stating that there are no arguments that can be passed to main.
Code:
return EXIT_SUCCESS;
Not necessary. A return value on success in C++ is not required.
From the 1st file:
Code:
cout << strName.c_str() << '\n';
The ofstream class is capable of handling STL strings, so you don't need the c_str( ) call.
From the 2nd file:
Code:
std::string strFile= "Name.txt";
ifstream fin( strFile.c_str() );
Redundant. Just use ifstream fin( "Name.txt" );