I am having problems with using classes. I'm not sure why this program will not run. I have pointed out the problem.
Thanks
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
class Student
{
private:
char lastname[40];
char firstname[40];
char id[10];
double gpa;
int score;
public:
Student(char lastname[], char firstname[], char id[], double gpa, int score); //the constructor
void showStudent();
void setName(char newFirst[], char newLast[]);
void setID(char newID[]);
int setGPA(double newGPA);
int setScore(int newScore);
char getDecision();
};
int main()
{
Student stu1 (Thomas, James, 55443 , 3.0, 1350 ); //This is the problem :(
}
/*************** ******/
Student::Info(c har lastname[], char firstname[], char id[], double gpa, int score)
{
}
/*************** ******/
void Student::showSt udent()
{
cout << setiosflags(ios ::fixed) <<setprecision( 1);
cout << setiosflags(ios ::left);
}
Thanks
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
class Student
{
private:
char lastname[40];
char firstname[40];
char id[10];
double gpa;
int score;
public:
Student(char lastname[], char firstname[], char id[], double gpa, int score); //the constructor
void showStudent();
void setName(char newFirst[], char newLast[]);
void setID(char newID[]);
int setGPA(double newGPA);
int setScore(int newScore);
char getDecision();
};
int main()
{
Student stu1 (Thomas, James, 55443 , 3.0, 1350 ); //This is the problem :(
}
/*************** ******/
Student::Info(c har lastname[], char firstname[], char id[], double gpa, int score)
{
}
/*************** ******/
void Student::showSt udent()
{
cout << setiosflags(ios ::fixed) <<setprecision( 1);
cout << setiosflags(ios ::left);
}
Comment