i am trying to write code for my function project but i get errors can somone tell me if i am on the write track at least
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
//fn prototype for passing num of students in class
// *** void DisplayStudent(double num, double answer); ???
void DisplayStudent(double num);
// *** void DisplayName(string& courseName,double answer);
void DisplayName(string& courseName,string& answer);
void DisplayCredit(double& credit,double& answer1);
// *** int main ()
int main()
{
//*** double num,answer;
double num;
string answer;
string courseName;
double credit;
cout << "Enter the total number of students in each class \n";
cin >> num;
//first call then bounces too loop
//function call
// *** DisplayStudent(answer,num);
DisplayStudent(num);
DisplayName(courseName,answer);
cout<<"the amount of credits is "<<&credit<<endl;
cout << "The course you are taking is " << courseName<<endl;
return 0;
}
//function goes here
// *** void DisplayStudent(double num,double answer)
void DisplayStudent(double num)
{
// *** cout<<" the total number of students=" << answer;
cout<<" the total number of students=" << num<<endl;
}
void DisplayName(string &courseName,string& answer )
{
cout << "what course please enter without spaces" << answer<<endl;
cin >> courseName;
}
the functions should include pass by reference for course name and number of credits
and if possible include a function on how to caculate a gpa