Help

Write a program with a class that contains following data members

• Id

• Marks

Create and array of objects of size 10. Create a function read() to take input from user. Then create two functions to find the highest and lowest marks in the array. Create a destructor that sets all of the elements in the array to 0.
#include <iostream>
using namespace std;

class InFo {

private :
int ID, MarKs;
public:

InFo() {

ID = 0;
MarKs = 0;
}
~InFo() {};


void Read()
{
int id, marks;


cin >> id;
cout << endl;

cout << "Enter your Marks : ";
cin >> marks;

ID = id;
MarKs = marks;
}
int getData()
{
return ID ,MarKs;
}



};


int main() {

InFo instance[10],instance2[10];

for (int i = 1; i <= 10 ; i++)
{
cout << endl;
cout << "Please enter student ID for " << i << " : ";
instance[i].Read();


}

system("pause");

return 0;
}




im completely lost as to what I have to do next ????
Topic archived. No new replies allowed.