I wish I knew were the error in this was, but I do not. Here is the class:

```
class Student
{
public:
float grade[10];
float averageGrade;

float average();
Student() : averageGrade(0.0f) {}

};

```

Here is the function:

```
float Student::average()
{ 

    cout << "How many grades would you like to enter? (Up to ten)\n";
    float x;
    cin >> x;

cout << "What is your first grade?";
cin >> grade[0];
for (int i = 1; i < x; i++)
{
cout << "What is the next number?\n";
cin >> grade[i];
}
averageGrade = accumulate(grade, grade+10, 0.0);
averageGrade = averageGrade / x;

return averageGrade;
    }

```

And here is main:

```
    int main()
{
Student s;

s.average();

cout << s.averageGrade;
system ("PAUSE");
return 0;
}

```

So whenever it outputs s.averageGrade, I just get what looks like a memory address or something. There are no errors when compiling.

Here is the output:

```
1>------ Build started: Project: Weapons, Configuration: Debug Win32 ------
1>Compiling...
1>weapon.cpp
1>c:\users\hastudent\documents\visual studio 2008\projects\weapons\weapons\weapon.cpp(31) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>Linking...
1>Embedding manifest...
1>Build log was saved at "file://c:\Users\HAStudent\Documents\Visual Studio 2008\Projects\Weapons\Weapons\Debug\BuildLog.htm"
1>Weapons - 0 error(s), 1 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

```