{for(int x=55;x<=60;x++)
{gotoxy(x,y);color(0x9f);cout<<" ";}}
}
void loading() //loading screen
{gotoxy(11,30);color(0xB9);cout<<" This program is made specifically for BSCE students of";
gotoxy(11,32);color(0xB9);cout<<" National-University Philippines. All rights reserved";
for(int x=15;x<=60;x++)
{Sleep(90);
gotoxy(x,35);color(0x9e);cout<<" ";}
system("cls");
}
main()
{frontpage();
loading();
int oldnew;
color(0Xb0);gotoxy(20,20);cout<<" ";
color(0xb0);gotoxy(20,21);cout<<" ARE YOU AND OLD OR A NEW STUDENT? ";
color(0xb0);gotoxy(20,22);cout<<" ";
color(0xb0);gotoxy(20,23);cout<<" ";
color(0xb0);gotoxy(37,23);cout<<" ";
color(0xb0);gotoxy(20,24);cout<<" <1> NEW ";
color(0xb0);gotoxy(37,24);cout<<" <2> OLD ";
color(0xb0);gotoxy(20,25);cout<<" ";
color(0xb0);gotoxy(37,25);cout<<" ";
color(0xb0);gotoxy(20,26);cout<<" ";
color(0xb0);gotoxy(20,27);cout<<" ";
gotoxy(5,3);cout<<"Flowcode: 1-2010-BSCE"; //top part
gotoxy(5,4);cout<<"Flow Name: CURRICULUM FOR BACHELOR OF SCIENCE IN CIVIL ENGINEERING"; //top part
gotoxy(5,5);cout<<"Course: BSCE"; //top part
gotoxy(5,7);cout<<"Subjects to be taken:\n";
cout<<" Subject Code: Subject:\n";
cout<<" HENGC01 | English Communication 1\n";
cout<<" HFILKOM | Komunikasyon sa Akademikong Filipino\n";
cout<<" FCOLAL7 | College Algebra\n";
cout<<" FPSTRIG | Plane and Spherical Trigonometry\n";
cout<<" FGNCNM | General Chemistry\n\n";
cout<<" Miscellaneous: \n";
cout<<" Registration Fee P 11,130.00\n";
cout<<" Library Fee 899.00\n";
cout<<" Student Activity Fee 222.20\n";
cout<<" Atheltic Development Fee 279.00\n";
cout<<" Medical and Dental Fee 202.00\n";
cout<<" Audio Visual Fee 263.00\n";
cout<<" Academic Community Advancement Fee 334.00\n";
cout<<" Cultural Fee 246.00\n";
cout<<" Guidance Counselling Fee 230.00\n";
cout<<" Development Fee 1,894.00\n";
cout<<" Internet Fee 361.00\n";
cout<<" Testing Materials Fee 202.00\n";
cout<<" Insurance Fee 56.00\n";
cout<<" Energy Fee 2,541.00\n";
cout<<" TOTAL PAYMENT: P 31,954";
}
void grading()
}int inYear,inSem;
string username;
string password;
x:
for(int x=20;x<=53;x++) {gotoxy(x,20);color(0xe0);cout<<" ";}
for(int x=20;x<=53;x++) {gotoxy(x,21);color(0xe0);cout<<" ";}
for(int x=20;x<=53;x++) {gotoxy(x,22);color(0xe0);cout<<" ";}
gotoxy(20,22);cout<< " LOG-IN ";
color(0xf0);
gotoxy(20,23);cout<<" Username ";
gotoxy(20,24);cout<<" ";
gotoxy(20,25);cout<<" Password ";
gotoxy(20,26);cout<<" ";
gotoxy(33,23);cin>>username;
gotoxy(33,25);cin>>password;
if(username=="Zarah" && password=="Ferrer") {cout<<"Welcome to National University Enrollment Assessment System\n";system("cls");}
else if(username=="JC" && password=="Cheng") {cout<<"Welcome to National University Assessment System\n";system("cls"):}
else if(username=="Javen" && password=="Taal") {cout<<"Welcome to National University Assessment System\n";system("cls"):}
else if(username=="Adriel" && password=="Bellosillo") {cout<<"Welcome to National University Assessment System\n";system("cls"):}
else{cout<<"Incorrect username or password. Please try again."<<"\n"<<endl;
system("cls");goto x;
gotoxy(5,3);cout<<"Flowcode: 1-2010-BSCE"; //top part
gotoxy(5,4);cout<<"Flow Name: CURRICULUM FOR BACHELOR OF SCIENCE IN CIVIL ENGINEERING"; //top part
gotoxy(5,5);cout<<"Course: BSCE"; //top part
gotoxy(5,7);cout<<"Subjects to be taken:\n";
cout<<" Subject Code: Subject:\n";
cout<<" HENGC01 | English Communication 1\n";
cout<<" HFILKOM | Komunikasyon sa Akademikong Filipino\n";
cout<<" FCOLAL7 | College Algebra\n";
cout<<" FPSTRIG | Plane and Spherical Trigonometry\n";
cout<<" FGNCNM | General Chemistry\n\n";
cout<<" Miscellaneous: \n";
cout<<" Registration Fee P 11,130.00\n";
cout<<" Library Fee 899.00\n";
cout<<" Student Activity Fee 222.20\n";
cout<<" Atheltic Development Fee 279.00\n";
cout<<" Medical and Dental Fee 202.00\n";
cout<<" Audio Visual Fee 263.00\n";
cout<<" Academic Community Advancement Fee 334.00\n";
cout<<" Cultural Fee 246.00\n";
cout<<" Guidance Counselling Fee 230.00\n";
cout<<" Development Fee 1,894.00\n";
cout<<" Internet Fee 361.00\n";
cout<<" Testing Materials Fee 202.00\n";
cout<<" Insurance Fee 56.00\n";
cout<<" Energy Fee 2,541.00\n";
cout<<" TOTAL PAYMENT: P 31,954";
}
void grading()
}int inYear,inSem;
string username;
string password;
x:
for(int x=20;x<=53;x++) {gotoxy(x,20);color(0xe0);cout<<" ";}
for(int x=20;x<=53;x++) {gotoxy(x,21);color(0xe0);cout<<" ";}
for(int x=20;x<=53;x++) {gotoxy(x,22);color(0xe0);cout<<" ";}
gotoxy(20,22);cout<< " LOG-IN ";
color(0xf0);
gotoxy(20,23);cout<<" Username ";
gotoxy(20,24);cout<<" ";
gotoxy(20,25);cout<<" Password ";
gotoxy(20,26);cout<<" ";
gotoxy(33,23);cin>>username;
gotoxy(33,25);cin>>password;
if(username=="Zarah" && password=="Ferrer") {cout<<"Welcome to National University Enrollment Assessment System\n";system("cls");}
else if(username=="JC" && password=="Cheng") {cout<<"Welcome to National University Assessment System\n";system("cls"):}
else if(username=="Javen" && password=="Taal") {cout<<"Welcome to National University Assessment System\n";system("cls"):}
else if(username=="Adriel" && password=="Bellosillo") {cout<<"Welcome to National University Assessment System\n";system("cls"):}
else{cout<<"Incorrect username or password. Please try again."<<"\n"<<endl;
system("cls");goto x;
}
//subject/grade input
color(0x97);
system("cls");
for(int y=18;y<=31;y++) //grid left part
{gotoxy(4,y);cout<<"|";)
for(int y=17;y<=73;x++){gotoxy(x,y);cout<<"_";}
cout<<endl;}
for(int y=18;y<=31;y++) //grid right part
{gotoxy(74,y);cout<<"|";}
for(int y=18;y<=29;y++) //grid 2nd vertical part
{gotoxy(13;y);cout<<"|";}
for(int y=18;y<=31;y++) //grid 3rd vertical part
{gotoxy(53,y);cout<<"|";}
for(int y=18;y<=31;y++) //grid 4th vertical part
{gotoxy(60;y);cout<<"|";}
for(int y=20;y<=29;y++) //grid 5th vertical part
{gotoxy(67,y);cout<<"|";}
//grading equivalent
for(int y=9;y<=16;y+=6) //grid horizontal part
{for(int x=5;x<=73;x++){gotoxy(x,y);cout<<"_";}}
for(int x=5;x<=73;x++){gotoxy(x,y);cout<<"_";} //grid horizontal part
for(int y=10;y<=15;y++) //grid 1st vertical part
{gotoxy(4,y);cout<<"|";}
for(int y=10;y<=15;y++) //grid 2nd vertical part
{gotoxy(74,y);cout<<"|";}
gotoxy(35,10);cout<<"REMARKS";
gotoxy(6,12);cout<<" USE ONLY PERCENTAGE (%) GRADING SYSTEM IN INPUTTING YOUR GRADES";
gotoxy(6,13);cout<<" 96-100= 4"; gotoxy(20,13);cout<<"87-90= 3";
gotoxy(6,14);cout<<" 91-95 = 3.5";gotoxy(20,14);cout<<"84-86= 2.5";
gotoxy(34,13);cout<<" 81-83 = 2";gotoxy(35,14);cout<<"78-80= 1.5";
gotoxy(48,13);cout<<" 75-77 = 1";gotoxy(49,14);cout<<">75 = 1.5";
gotoxy(62,13);cout<<" INC = 101"; gotoxy(63,14);cout<<"DROPPED=2";
//top part
gotoxy(5,1);cout<<"Name:"<<password<<","<<username; //must be (name)
gotoxy(5,3);cout<<"Flowcode: 1-2010-BSCE"; //top part
gotoxy(5,4);cout<<"Flow Name: CURRICULUM FOR BACHELOR OF SCIENCE IN CIVIL ENGINEERING"; //top part
gotoxy(5,5);cout<<"Course: BSCE"; //top part
if(inYear==1&&inSem==1)
{
system("cls");
gotoxy(5,1);cout<<"Name:"<<password<<","<<username; //must be (name)
gotoxy(5,3);cout<<"Flowcode: 1-2010-BSCE"; //top part
gotoxy(5,7);cout<<"Subjects to be taken:\n";
cout<<"SUBJECT CODE: Subject:\n";
cout<<"HENGCO1 | English Communication 1\n";
cout<<"HFILKOM | Komunikasyon sa Akademikong Filipino\n";
cout<<"FCOLAL7 | College Algebra\n";
cout<<"FPSTRIG | Plane and Spherical Trigonometry\n";
cout<<"FGENCNM | General Chemistry\n\n";
Its an enrollment system advising. We just have to copy it from a book. It's an advising system for students who wants to enroll. I just need to fix these errors. Appreciate your help.
1. [Error] a function-definition is not allowed here before '{' token
2. [Error] expected '}' at end of input
The compiler should also mention the line of code, where the error seems to occur. (Trivial for the latter "at the end of file" error, but crucial for the first error.)
On the first error the compiler has stumbled on '{' where it did not expect. Which '{' of your code is it and what is before it? (The "before" could be on multiple lines.)
The second error indicates an unpaired '{'. The compiler has seen an open scope {, then waded through the content of the scope until it did hit EOF, rather than a closing }.
If the parser fails to find a closing delimiter before the end-of-file, there is something mismatched.
You can often find this sort of problem by indenting your code. By not indenting your program, you make it artificially difficult to read and to follow -- and since studies have shown that you spend about 90% of your time reading your code, being able to read it is important.
In your program, find
1 2
void grading()
}int inYear,inSem;
You are missing (at least) a single opening brace following the function declaration.