So this is my beginning of a student database in C++.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
#include <iostream>
#include <conio.h>
#include <string>
using namespace std;
/* Declaration of variables */
string Name, MEG, Grade, Progress;
int Age, MEGN, GradeN;
/* Declaration of functions */
void TomSmith();
int main()
{
cout << "Input surname and press ENTER" << endl;
cin >> Name;
if (Name == Smith);
TomSmith();
return 0;
}
void TomSmith()
{
cout << "Name: Tom Smith" << endl;
Age = 16;
cout << "Age :" << Age << endl;
MEG = A;
MEGN = 5;
cout << "MEG:" << MEG << endl;
Grade = B;
GradeN = 4;
cout << "Grade:" << Grade << endl;
if (Grade > MEG)
Progress = Above
else if (Grade == MEG)
Progress = On
else
Progress = Below
cout << "Progress:" << Progress << endl;
}
|
I'm getting quite a few errors -
||=== Student Database, Debug ===|
In function 'int main()':|
error: 'Smith' was not declared in this scope|
In function 'void TomSmith()':|
'A' was not declared in this scope|
'B' was not declared in this scope|
'Above' was not declared in this scope|
expected ';' before 'else'|
||=== Build finished: 5 errors, 0 warnings (0 minutes, 0 seconds) ===|
I'm probably doing this completely wrong, but I'm still a complete noob, and I really don;t understand the errors.