#include
using namespace std;
class Student
{
int English;
int Computer;
int Total;
public:
Student(int en, int cp){English=en; Computer=cp; Total=en+cp;}
void Show()
{
cout<<"English:"<
};
int main()
{
Student S[3]={Student(90,100),Student(95,95),Student(80,85)};
for(int i=0;i<3;++i)
S[i].Show();
return 0;
}
#include "stdafx.h"
#include
#include
#include
using namespace std;
class student
{
private:
float english;
float computer;
float total;
public:
int show()
{
cout<<"english:"<
};
student(float a,float b){
english=a;
computer=b;
total=english+computer;};
~student(){};
};
int _tmain(int argc, _TCHAR* argv[])
{
student S[3]={student(135,125),student(12,156),student(26,125)};
int i;
for(i=0;i<3;i++)
{
S[i].show();
}
return 0;
}
0warning 0error