Re: [Dev-C++] no match for istream & >> {unknown type}
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: softnasolutions-ltd.fsbusiness.co.uk <so...@so...> - 2001-02-20 20:30:47
|
Thanks very much everybody who helped. My problem is soted now. By the way
what is "heap error"
----- Original Message -----
From: "Bolek Vrany" <vr...@pa...>
To: <dev...@li...>
Sent: Tuesday, February 20, 2001 11:27 AM
Subject: Re: [Dev-C++] no match for istream & >> {unknown type}
> Hi,
>
> the real problem is that name is a method of the Student_info class, not
> a data field (see declaration). You have to change your code to
>
> istream& Student_info::read(istream& is)
> {
> //read and store the student's name and midterm and final exams
> grades
> is >> n >> midterm >> final;
>
> read_hw(is, homework); //read and store all the stud
> homework grades
> return is;
> }
>
> I think this is what you have wanted. BTW, istream& read_hw(istream& in,
> vector<double>& hw) should return a value. Dev-CPP didn't warn me about
> it, but C++ Builder did.
>
>
> --
> ============================================================
> Ing. Boleslav Vrany
> Stanice techniku DDM hl. m. Prahy
> Pod Juliskou 2a
> Praha 6 - Dejvice
> 16000
> Czech Republic
>
> tel. (420 2) 243 10 240
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|