Next make sure your header file and its corresponding .cpp file are in the same directory, unless you've got your compiler configured to search certainly and not by default. Actually, what compiler you using? Is it command line or IDE GUI? Let me know.
Ok sorry I figured it out. I had to put #include <fstream> and using namespace std; in my header file and now it works fine. And I did what you said about putting all the files in a project. So sorry again and thank you for all your help.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...