有关类中成员函数的有关问题和析构函数的有关问题

有关类中成员函数的问题和析构函数的问题
//定义CStudent类 放入student.h头文件
#ifndef _STUDENT_H_
#define _STUDENT_H_
#include <string>
using namespace std;
class CStudent
{
private:
  string strName;
  double chinese;
  double english;
  double math;
public:
CStudent();
CStudent(string Name,double c,double e,double m);
friend ostream& operator<<(ostream& out,CStudent S )
  void SetChinese(double a); //这里的函数为什么要用void类型,和下面的注释相应
void SetEnglish(double a);
void SetMath(double a);
string returnName(string c);
double returnChinese();
double returnEnglish();
double returnMath();
double returnTotal();
double returnAvg();
~CStudent(){} //为什么要用析构函数,不用不可以吗?

};
#endif




//类的成员函数的实现; 放入 student.cpp文件中
#include<iostream>
#include"student.h"
using namespace std;
CStudent::CStudent()
{
strName="General student.";
chinese=0;
english=0;
math=0;

}
CStudent::CStudent(std::string Name,double c,double e,double m)
{
strName=Name;
chinese=c;
english=e;
math=m;


}
CStudent CStudent::operator+(CStudent S)
{
CStudent temper;
temper.strName="Total performance";
temper.chinese=this->chinese+S.chinese;  
temper.english=this->english+S.english;  
temper.math=this->math+S.math;
return temper;

}

ostream& operator<<(ostream out,CStudent S)  
{
out<<"("<<S.chinese<<","<<S.english<<","<<S.math<<")"<<endl;

}
void CStudent::SetChinese(double a) //和上面的问题相互应
{
 chinese=a;


}
void CStudent::SetEnglish(double a)
{
english=a;
}
void CStudent::SetMath(double a)  
{
math=a;
}


------解决方案--------------------
那些函数为什么要是void,其实没有什么讲究的。只不过一般人认为没有什么有意义的值可以返回,如果你想返回什么的都可以,只要你完成了你想做的事情。
析构函数就好像构造函数是一样的。是一类特殊的函数,当对象的生命周期结束后自动调用,释放对象占用的内存的。如果你不写,那么编译器会自动合成一个给你的。和默认构造函数差不多的。