Hello jebin,
Welcome to the forum.
It would be helpful if you would post the actual error messages that you received instead of making everyone guess what is wrong.
It could be your copy and past may have missed the closing } of main. Or it was never there to begin with.
Line 21 does not find the function definition for "Read()".
The switch/case is all wrong. You can only switch on an int or char. your case statement of
case'1532':
should be
case 1532:
. Notice the space betewn "case" and the number and the use of single quotes is for a character which means only one character. "defaule" should be the last part of the case statements.
Line 50 "cno" is undefined.
Line 52 You do not need the "int" before "i" and you are missing a ;.
Line 64 is almost a prototype, but not a function call.
Line 98 will not work the way it is written. Did you mean "getch()"?
An error for line 72 should be telling you that something is misspelled.
You have a good start, but yur indenting could be better. For an example:
Your code:
1 2 3 4 5 6
|
struct addr
{
int classroom;
int floor;
char section[10];
};
|
Would look better as:
1 2 3 4 5 6
|
struct addr
{
int classroom;
int floor;
char section[10];
};
|
I know that the indenting here is a bit more then normal, but you get the idea.
I would replace any character arrays with std::string (header file <string>).
The use of "conio.h" may be usable for you, but not everyone has this header file to use. And it is not a standard C++ header file.
"cstdio" would be a better choice over "stdio.h".
You should learn not to use
using namespace std;
. This
WILL get you in trouble some day.
Hope that helps,
Andy