ok so far this is what ive got for my code im trying to figure out how to start my for loop that will receive the array and the int that represents the count(2)?
#include<iostream>
using namespace std;
struct Student
{
char Name[30];
float GPA;
int Major;
};
//Function Prototype
Student studentdata(Student&);
//Function Prototype
Student changeData(Student&);
//Function Prototype
Student GetStudents(Student&);
int main()
{
struct Student s1;
struct Student s2;
struct Student s3;
s2 = studentdata(s1);
s2 = changeData(s2);
s2 = GetStudent(s3);
cout << "GPA: " << s2.GPA <<endl;
cout << "Major: " << s2.Major << endl;
cout << "Students Name: " << s2.Name << endl;
return 0;
}
Student studentdata(Student &s1)
{
cout << "please enter your name: ";
cin >> s1.Name;
cout << "please enter your GPA: ";
cin >> s1.GPA;
cout << "please enter your major: ";
cin >> s1.Major;
return s1;
}
Student changeData(Student &s2)
{
s2.GPA = 3;
s2.Major = 1;
return s2;
}
Student GetStudents(Student &s3)
{
for (