11:15: error: expected ':' before 'int'
12:15: error: expected ':' before 'string'
73:1: error: expected '}' at end of input In constructor 'student::student(int)':
27:8: error: expected primary-expression before '(' token
27:9: error: expected primary-expression before 'int'
27:22: error: expected primary-expression before 'j'
40:4: error: expected primary-expression before 'public'
50:4: error: expected primary-expression before 'public' In member function 'void student::main()':
65:10: error: redeclaration of 'student st1'
64:9: note: 'student st1' previously declared here
65:29: error: no matching function for call to 'student::student(int, std::string&)'
65:29: note: candidates are:
21:1: note: student::student(int)
21:1: note: candidate expects 1 argument, 2 provided
15:1: note: student::student()
15:1: note: candidate expects 0 arguments, 2 provided
5:7: note: student::student(const student&)
5:7: note: candidate expects 1 argument, 2 provided
5:7: note: student::student(student&&)
5:7: note: candidate expects 1 argument, 2 provided
66:5: error: 'class student' has no member named 'output'
67:6: error: 'class student' has no member named 'input'
68:6: error: 'class student' has no member named 'output'
70:5: error: 'class student' has no member named 'input'
71:5: error: 'class student' has no member named 'output'
72:5: error: 'class student' has no member named 'output' At global scope:
73:1: error: expected unqualified-id at end of input
8:17: error: 'name' was not declared in this scope
8:17: error: bit-field '<anonymous>' with non-integral type
10:9: error: expected unqualified-id before '{' token
15:10: error: expected ':' before 'void'
22:16: error: expected ':' before 'void' In member function 'void student::input()':
20:10: error: 'name' was not declared in this scope In member function 'void student::output()':
25:36: error: 'name' was not declared in this scope At global scope:
30:11: error: '::main' must return 'int' In function 'int main()':
35:2: error: 'st2' was not declared in this scope
That's the error latest list. I'll give you a tip about debugging MAhmed. Fix the first error. Recompile and address the first error in that new list.
Second tip: You must read the numbers and 8:17 means your next error is in line 8.
Line 8: You're using string, but have not included the <string> header.
Line 8: Lose the : after string.
Line 10: Your constructor needs () after student.
Line 12: You can't assign an int to a string.
Lines 15,22: Lose the public
Line 30: main must be type int.
Lines 35,36: You haven't declared st2