Mail Archives: djgpp/1999/04/14/06:51:39
In article <3711F7C5 DOT 29C AT pacbell DOT net>, thethoms <thethoms AT pacbell DOT net> wrote:
>Hi!
>
>Here is my code: (A description of the problem follows it).
<SNIP>
>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
----------------------------------------------------------------------
- Raw text -