Answers for "how to add an object to an array c++"

C++
0

c++ add object to array

int main()
{
	Student st[5];
	for( int i=0; i<5; i++ )
	{
		cout << "Student " << i + 1 << endl;
		cout << "Enter name" << endl;
		st[i].getName();
		cout << "Enter marks" << endl;
		st[i].getMarks();
	}
Posted by: Guest on December-29-2020

Code answers related to "how to add an object to an array c++"

Browse Popular Code Answers by Language