Freaky_Chris and mrboolf, yeah, sorry it was my mistake when I wrote the thread. For some reason I didn't just copy and paste. Line 38 should be
as Freaky_Chris pointed out.
if u cannot pass by reference,
why do you need to pass an ifstream object.Just declare an instance of ifstream again and initialize that with the same file.
foo.open ("whatever be the filename.txt", ifstream::in);
and use it
The problem with this approach is that I plan to use the function with more than one file.
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 ...