Newsgroups: comp.os.msdos.djgpp From: manfred DOT heumann AT uni-bielefeld DOT de (Manni Heumann) Subject: Re: Help! One dimensional arrays aren't working! References: <3711F7C5 DOT 29C AT pacbell DOT net> X-Newsreader: News Xpress 2.01 Date: Tue, 13 Apr 1999 08:21:06 GMT NNTP-Posting-Host: dhcp33-228.uni-bielefeld.de Message-ID: <3712fe72.0@news.uni-bielefeld.de> X-Trace: 13 Apr 1999 10:21:06 +0200, dhcp33-228.uni-bielefeld.de Lines: 37 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article <3711F7C5 DOT 29C AT pacbell DOT net>, thethoms wrote: >Hi! > >Here is my code: (A description of the problem follows it). >int class[100]={-1}; >int classNumber=0,Sum=0,lessTen=0,lessTwenty=0, >inData>>class[classnumber]; > Sample=pow((class[counter]-Mean),2) >StdDev=sqrt(Sample/(classnumber-1)) > I have had my C++ instructor look at these statements, and she can't >seem to find anything wrong. Is there some other method of doing this >in DJGPP? > >Thanks in advance! > >T. Thoms The first problem is, that "class" is of course a reserved keyword in c++. The second problem is, that you declare a variable classNumber and then try to use the variable classnumber. The third problem is missing semicolons (in the last two lines I quoted). But to me it seems the biggest problem is your c++ instructor. Manni -- ---------------------------------------------------------------------- Manni Heumann Bielefeld, Germany ----------------------------------------------------------------------