If you have errors, one thing you can do to help people help you is to post the errors. Probably only the first few are necessary. There tends to be a snowball effect where the first error(s) cause more down the line.
Just at a glance, the compiler doesn't encounter anything telling it what login is until well after you try to call it -- put a declaration/prototype for the function before main's definition.
Thanks Cire and vlad..
These are the errors that I'm getting.. Please help me..
--------------------Configuration: Cpp1 - Win32 Debug--------------------
Compiling...
Cpp1.cpp
e:\c program for lila\ui\cpp1.cpp(20) : error C2065: 'login' : undeclared identifier
e:\c program for lila\ui\cpp1.cpp(42) : error C2065: 'Leave' : undeclared identifier
e:\c program for lila\ui\cpp1.cpp(42) : error C2146: syntax error : missing ';' before identifier 'Menu'
e:\c program for lila\ui\cpp1.cpp(42) : error C2065: 'Menu' : undeclared identifier
e:\c program for lila\ui\cpp1.cpp(46) : error C2660: 'exit' : function does not take 0 parameters
e:\c program for lila\ui\cpp1.cpp(60) : error C2373: 'login' : redefinition; different type modifiers
e:\c program for lila\ui\cpp1.cpp(80) : error C2065: 'adminmenu' : undeclared identifier
e:\c program for lila\ui\cpp1.cpp(99) : error C2143: syntax error : missing ';' before '}'
e:\c program for lila\ui\cpp1.cpp(99) : error C2143: syntax error : missing ';' before '}'
e:\c program for lila\ui\cpp1.cpp(99) : error C2143: syntax error : missing ';' before '}'
e:\c program for lila\ui\cpp1.cpp(103) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(103) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(103) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(104) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(104) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(104) : error C2086: 'cout' : redefinition
e:\c program for lila\ui\cpp1.cpp(104) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(105) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(105) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(105) : error C2086: 'cout' : redefinition
e:\c program for lila\ui\cpp1.cpp(105) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(106) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(106) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(106) : error C2086: 'cout' : redefinition
e:\c program for lila\ui\cpp1.cpp(106) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(107) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(107) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(107) : error C2086: 'cout' : redefinition
e:\c program for lila\ui\cpp1.cpp(107) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(108) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(108) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(108) : error C2086: 'cout' : redefinition
e:\c program for lila\ui\cpp1.cpp(108) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(109) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(109) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(109) : error C2086: 'cout' : redefinition
e:\c program for lila\ui\cpp1.cpp(109) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(110) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(110) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(110) : error C2086: 'cout' : redefinition
e:\c program for lila\ui\cpp1.cpp(110) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(111) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(111) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(111) : error C2086: 'cout' : redefinition
e:\c program for lila\ui\cpp1.cpp(111) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(112) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(112) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(112) : error C2086: 'cout' : redefinition
e:\c program for lila\ui\cpp1.cpp(112) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(113) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(113) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(113) : error C2086: 'cout' : redefinition
e:\c program for lila\ui\cpp1.cpp(113) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(114) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(114) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(114) : error C2086: 'cout' : redefinition
e:\c program for lila\ui\cpp1.cpp(114) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(115) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(115) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(115) : error C2086: 'cout' : redefinition
e:\c program for lila\ui\cpp1.cpp(115) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(116) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(116) : error C2501: 'cout' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(116) : error C2086: 'cout' : redefinition
e:\c program for lila\ui\cpp1.cpp(116) : error C2143: syntax error : missing ';' before '<<'
e:\c program for lila\ui\cpp1.cpp(117) : error C2143: syntax error : missing ';' before '>>'
e:\c program for lila\ui\cpp1.cpp(117) : error C2501: 'cin' : missing storage-class or type specifiers
e:\c program for lila\ui\cpp1.cpp(117) : error C2143: syntax error : missing ';' before '>>'
e:\c program for lila\ui\cpp1.cpp(118) : error C2143: syntax error : missing ';' before 'switch'
e:\c program for lila\ui\cpp1.cpp(118) : error C2143: syntax error : missing ';' before '{'
e:\c program for lila\ui\cpp1.cpp(118) : error C2447: missing function header (old-style formal list?)
e:\c program for lila\ui\cpp1.cpp(145) : error C2143: syntax error : missing ';' before '}'
e:\c program for lila\ui\cpp1.cpp(145) : error C2143: syntax error : missing ';' before '}'
e:\c program for lila\ui\cpp1.cpp(145) : error C2143: syntax error : missing ';' before '}'
e:\c program for lila\ui\cpp1.cpp(147) : error C2143: syntax error : missing ';' before '}'
e:\c program for lila\ui\cpp1.cpp(147) : error C2143: syntax error : missing ';' before '}'
e:\c program for lila\ui\cpp1.cpp(147) : error C2143: syntax error : missing ';' before '}'
e:\c program for lila\ui\cpp1.cpp(148) : error C2143: syntax error : missing ';' before '{'
e:\c program for lila\ui\cpp1.cpp(148) : error C2447: missing function header (old-style formal list?)
Error executing cl.exe.
Creating browse info file...
@Smarty: Yeah, or he could just use this - combining those three lines. cout << "\n\n" << endl;
@zeromahesh: There is clearly a lot you do not understand. Please examine my changes carefully; I am very new to C++, but my changes do indeed get your code to compile.
Polaz thank u soooo much my friend.. It's working greatly.. I'm so happy... Thanks a lot.. I need to implement those functions also. I'll get the requirement and then let you know.. Then please help me. Thanks again... :)
Polaz I had a issue.. I compile and build your code on a Windows Xp machine using Microsoft Visual C++ 6.0 and ran it nicely... but when I copy that .exe file to Windows 7 machine and try to run using command line it says windows incompatible thing.. So how can I compile for Windows 7 using windows Xp..