i m trying to create a project on username and password validation but while executing it accepts even wrong username and password stored in the file
(i m using turbo c++ and i m a beginner too)
I have several pointers for you:
1. Stop using Turbo C++ - it's old, obsolete, and not up-to-date and it let you go away with this terrible example that should not even compile according to official C++ standard.
2. Download Microsoft Visual Studio C++ Express or Code::Blocks instead (both for free)
3. Read good tutorial, but not as old and obsolete as your IDE. I believe you are learning from a very old tutorial or book. Look at www.learncpp.com - they have some begginer friendly tutorials, that take into account recent changes to the C++ standard
4. Please, paste formatted code. there is this
<>
icon right to the edit field.
5. Please use spaces. This looks horrible: if(strcmp(name2,uname)==0&&strcmp(pass2,pass)==0)
6. Look at my changes to your code - it's still buggy, but at least gets the job done.
sir it is still showing welcome for invalid username and password in turbo c++
but it is working perfectly in borland c++.sir the problem is that we have to use turbo c++ compulsorily.can u help me sir??plz help me to code in turco c too.thank u.