> On Sep 13, 6:22 pm, Jerry Coffin <jcof...@taeus.com> wrote:
> You probably don't want to use pointers here -- you almost certainly
> want to use references instead. For reference (no pun intended) you
> should virtually _always_ plan on passing any stream by reference.
> ex_08-09.cpp:22: error: variable or field ?read_file? declared void
>
> Without the 'std::' on the beginning, the compiler doesn't recognize
> that 'ifstream' is supposed to be a type. It's trying to read it as a
> value, so it thinks you have something like:
>
> int x(1);
>
> but it's telling you that you can't define a variable of type 'void'.
thanks Jerry, I learned 2 very-important things today :)