does not take 0 arguments?
help! here is my code:
(i'll just paste some parts because it is 60000 characters long)
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 49 50 51 52 53 54 55 56 57
|
string yearterm();
int main()
{
string ans;
do {
ans=yearterm();
}
while ((ans=="Yes"||ans == "YES"||ans == "yes"||ans == "Y"||ans == "y"));
_getch();
return 0;
}
string yearterm(){
string ans;
student p1;
p1 = INFO();
cout<<"\n\nStudent Lastname: "<<p1.lastName<<endl;
cout<<"Student Firstname: "<<p1.firstName<<endl;
cout<<"Student Age: "<<p1.age<<endl;
cout<<"Student Number: "<<p1.studentNumber<<endl;
cout<<"Student Year Level: "<<p1.yearLevel<<endl;
cout<<"Student Term: "<<p1.term<<endl;
cout<<"\n\n";
_getch();
if ((p1.yearLevel == "1"||p1.term == "1st"||p1.term == "first"||p1.term == "freshmen"||p1.term == "First"||p1.term == "Freshmen"||p1.term == "FRESHMEN"||p1.term == "FIRST"||p1.term == "1ST")&&(p1.term == "1st"||p1.term == "first"||p1.term == "First"||p1.term == "1ST"||p1.term == "FIRST"||p1.term == "1")){
y1t1();}
else if ((p1.yearLevel == "1"||p1.term == "1st"||p1.term == "first"||p1.term == "freshmen"||p1.term == "First"||p1.term == "Freshmen"||p1.term == "FRESHMEN"||p1.term == "FIRST"||p1.term == "1ST")&&(p1.term == "2nd"||p1.term == "second"||p1.term == "Second"||p1.term == "2ND"||p1.term == "SECOND"||p1.term == "2")){
y1t1();}
else if ((p1.yearLevel == "1"||p1.term == "1st"||p1.term == "first"||p1.term == "freshmen"||p1.term == "First"||p1.term == "Freshmen"||p1.term == "FRESHMEN"||p1.term == "FIRST"||p1.term == "1ST")&&(p1.term == "3rd"||p1.term == "third"||p1.term == "Third"||p1.term == "3RD"||p1.term == "THIRD"||p1.term == "3")){
y1t1();}
else if ((p1.yearLevel == "2"||p1.term == "2nd"||p1.term == "second"||p1.term == "sophomore"||p1.term == "Second"||p1.term == "Sophomore"||p1.term == "SOPHOMORE"||p1.term == "SECOND"||p1.term == "2ND")&&(p1.term == "1st"||p1.term == "first"||p1.term == "First"||p1.term == "1ST"||p1.term == "FIRST"||p1.term == "1")){
y2t1();}
else if ((p1.yearLevel == "2"||p1.term == "2nd"||p1.term == "second"||p1.term == "sophomore"||p1.term == "Second"||p1.term == "Sophomore"||p1.term == "SOPHOMORE"||p1.term == "SECOND"||p1.term == "2ND")&&(p1.term == "2nd"||p1.term == "second"||p1.term == "Second"||p1.term == "2ND"||p1.term == "SECOND"||p1.term == "2")){
y2t1();}
else if ((p1.yearLevel == "2"||p1.term == "2nd"||p1.term == "second"||p1.term == "sophomore"||p1.term == "Second"||p1.term == "Sophomore"||p1.term == "SOPHOMORE"||p1.term == "SECOND"||p1.term == "2ND")&&(p1.term == "3rd"||p1.term == "third"||p1.term == "Third"||p1.term == "3RD"||p1.term == "THIRD"||p1.term == "3")){
y2t1();}
else if ((p1.yearLevel == "3"||p1.term == "3rd"||p1.term == "third"||p1.term == "junior"||p1.term == "Third"||p1.term == "Junior"||p1.term == "JUNIOR"||p1.term == "THIRD"||p1.term == "3RD")&&(p1.term == "1st"||p1.term == "first"||p1.term == "First"||p1.term == "1ST"||p1.term == "FIRST"||p1.term == "1")){
y3t1();}
else if ((p1.yearLevel == "3"||p1.term == "3rd"||p1.term == "third"||p1.term == "junior"||p1.term == "Third"||p1.term == "Junior"||p1.term == "JUNIOR"||p1.term == "THIRD"||p1.term == "3RD")&&(p1.term == "2nd"||p1.term == "second"||p1.term == "Second"||p1.term == "2ND"||p1.term == "SECOND"||p1.term == "2")){
y3t1();}
else if ((p1.yearLevel == "3"||p1.term == "3rd"||p1.term == "third"||p1.term == "junior"||p1.term == "Third"||p1.term == "Junior"||p1.term == "JUNIOR"||p1.term == "THIRD"||p1.term == "3RD")&&(p1.term == "3rd"||p1.term == "third"||p1.term == "Third"||p1.term == "3RD"||p1.term == "THIRD"||p1.term == "3")){
y3t1();}
else if ((p1.yearLevel == "4"||p1.term == "4th"||p1.term == "fourth"||p1.term == "senior"||p1.term == "Fourth"||p1.term == "Senior"||p1.term == "SENIOR"||p1.term == "FOURTH"||p1.term == "4TH")&&(p1.term == "1st"||p1.term == "first"||p1.term == "First"||p1.term == "1ST"||p1.term == "FIRST"||p1.term == "1")){
y4t1();}
else if ((p1.yearLevel == "4"||p1.term == "4th"||p1.term == "fourth"||p1.term == "senior"||p1.term == "Fourth"||p1.term == "Senior"||p1.term == "SENIOR"||p1.term == "FOURTH"||p1.term == "4TH")&&(p1.term == "2nd"||p1.term == "second"||p1.term == "Second"||p1.term == "2ND"||p1.term == "SECOND"||p1.term == "2")){
y4t1();}
else if ((p1.yearLevel == "4"||p1.term == "4th"||p1.term == "fourth"||p1.term == "senior"||p1.term == "Fourth"||p1.term == "Senior"||p1.term == "SENIOR"||p1.term == "FOURTH"||p1.term == "4TH")&&(p1.term == "3rd"||p1.term == "third"||p1.term == "Third"||p1.term == "3RD"||p1.term == "THIRD"||p1.term == "3")){
y4t1();}
else if ((p1.yearLevel == "5"||p1.term == "5th"||p1.term == "fifth"||p1.term == "Fifth"||p1.term == "FIFTH"||p1.term == "5TH")&&(p1.term == "1st"||p1.term == "first"||p1.term == "First"||p1.term == "1ST"||p1.term == "FIRST"||p1.term == "1")){
y5t1();}
else{
cout<<"Invalid selection, do you want to try again? ";
cin>>ans;
}
return ans;
}
|
the error is
Error 1 error C2660: 'yearterm' : function does not take 0 arguments
:(
please also check for other errors, this is my first time to make a program this big alone :D
Last edited on
you can't have string yearterm(void) you have to have a variable in it
This code looks ok. Post the whole thing, so that I can compile it. If there's a lot, post it in pastebin, or to be extra nice, ideone or codepad.
you must not get the error please past the complete code .
Topic archived. No new replies allowed.