I can't get the it to output correctly! Please help

When it compiles I am able to enter the name but not the GPA or Major. It skips over them so that the user can't enter data. And then it displays the correct name but the memory address for the GPA and Major.

Here is your problem int Major;. This should be a string or a char array if your assignment cant use strings. When the user sees "Enter your major" he/she automatically thinks you mean something like "Computer Science", "Math" ect. If you want them to use a number for their major give them some choices like

1 - Math

2 - Science

3 - Plumbing

Or something like that.

Also noticed you make a call to your function s2 = studentData(s1); but you never use s2. This might be something you plan to do later but I thought I might need to explain. If you only wanted to return your function results to s1 you can call it this way studentData(s1);. Also I would recommend changing the &s1 in your function parameters to something else so it doesn't cause confusion with the other s1.

Unfortunately, she has given us the instructions with it in it. I have completed the program but now I have more issues and I am about to throw my computer against the wall. I've been working on this for 3 days now and I know it's not that complicated. Can I submit my code w the instruction under this same thread or do i have to start a new one?

Here is my final code and the instructions. I am not sure if I covered everything correctly. The instructions aren't clear as to what should fully display. Instructions:
This program will include error trapping with try and catch.

Put a throw in each function which gets user input and throw a string "Bad Major" if a Major of 0 is entered. The input functions are specified in 2, 4 and 7 below.

Create a global structure as follows:

123456

struct Student
{
char Name[30];
float GPA;
int Major;
};

1. In main create 2 instances of that structure. Call them S1 and S2.

2. Create and call a function named StudentData: S2 = StudentData( S1 ); //this is the call to the function
The function receives as a parameter a reference to the structure (prototyping will handle this) and will return a reference to the structure. Use couts and cins for getting data from the user. For testing purposes, change the data in S1 so that the GPA is 3.5 and the Major is 2. Since you are to use cins for getting data from the user, you are the user and just enter these values. After the call to the function both S1 and S2 will contain the same data.

3. In main print the data stored in the structures S1 and S2 using cout.

4. Call a function named ChangeData with a pointer to S2 as the argument:ChangeData( &S2 ); //this is the call to the function
Change the data in S2 so that the GPA is 3.0 and the Major is 1. (Using these values for testing…)

5. Back in main print the data stored in the structure S2 using cout.

6. Now create an array of 2 structures in main. Call the array Students.

7. Create a function, GetStudents, which will receive the array and an int representing the number of elements(2). In the function, loop through the data and get all three fields from the user using cin, cin.getline and cout statements. Organize like this:

12345678910

for (...........)
{
cout prompt to user
cin.getline for name
cout prompt to user
cin for GPA
cout promp to user
cin for Major
cin.ignore(1);
}

The problem is that a cin for a numeric value will leave the ENTER key in the keyboard buffer and that is OK with cin and other numbers but not with strings, thus we must remove it on our own. cin.ignore should handle this for us.

8. Call the function GetStudents from main.

9. Create a function, PrintStudents, which will receive the same arguments as GetStudents. It will print out the array of students on 2 lines, 1 line per student.

Now for number 5. This is where it started going wrong. They want you to print the data you changed again. So put your call to changeData() below your cout statements you already have. And remmber when you want to call a function like changeData() you can call it like this changeData(s2); which will do the same thing as s2 = changeData(s2);. Let me explain this a little more. When you use a reference (the &) in a function parameter like changeData(Students &s2) you are changing whatever variable you pass into the function, which in this case is s2. Like this example

Now for number 6. Student students[2]; that will be your array of 2 student structs. Make sure to name it Students like they said to not getStudents.

Number 7. Your function looks good except for the use of getStudent[] for a parameter (Remmber dont use names that you have already used for a variable or anything else if possible. Your function call can look something like this.

123

Student students[2]; // A array that holds 2 student structs
getStudent(students, 2); // Note you can use a literal int as a parameter.

Hope this helps and makes sense I'm not the best at explaining things, and wasn't really sure where you were stuck at. But you seem capable of doing the rest without to much problems. Just keep working at it and if you have any questions ask and we can try and help with it.