From: "John" Newsgroups: comp.os.msdos.djgpp References: Subject: Re: vectors Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Message-ID: Date: Sun, 16 Apr 2000 20:06:53 GMT NNTP-Posting-Host: 24.95.139.17 X-Complaints-To: abuse AT stny DOT rr DOT com X-Trace: typhoon.nyroc.rr.com 955915613 24.95.139.17 (Sun, 16 Apr 2000 16:06:53 EDT) NNTP-Posting-Date: Sun, 16 Apr 2000 16:06:53 EDT Organization: Time Warner Road Runner - Binghamton NY To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com and can someone give me nd example of the copy constructer I would need to use, I can't seem to get one to work. Thanks "John" wrote in message news:jrnK4.4389$4W3 DOT 69583 AT typhoon DOT nyroc DOT rr DOT com... > I need a little help doing something > What I want to do is this > > class student > { > // i know all this shouldn't be public but for this > // example it is > char studentName[20]; > vector grade; > } > > int main() > > vector mathClass(10); > cout<<"size of student "< grade "< return 0; > } > this code gives me an error of " 'class vector >' has no member named 'grade' > whats wrong with this and how would i set the vector grade in class student to start with something like 15 elements? I know this is something that would need to be done in the classes constructer but how? > > Thanks! > > >