Hello!
I am trying to create a password field programming in c++ in qt creator.
On compiling the program, the compiler is giving an error at the clreol() and gotoxy() statements.
I have included conio.h header file but the error still persists.
do
{
++k;
if(k > 0)
{
cout<<"Incorrect password length\n";
}
i = 0;
system("cls");
cout<<"Password:\t\t\t\t\t(min. 6, max 20 char.)\n";
while(pass[i]!=13)
{
ch = getch();
if(ch == '\b')
{
i = i - 2;
gotoxy(17 + i, 2);
clreol();
}
else
{
pass[i] = ch;
cout<<"*";
}
++i;
}
pass[i]='\0';
}while(strlen(pass) < 6);
The error it gives is
'gotoxy was not declared in scope'
I have included conio.h header file but the error still persists.
conio.h is not a part of C++. It is outdated and non-standard. Some compilers do include some most often used functionality from it to allow some existing programs to compile.
But if you want full support of it, you will need to find modern version of conio library for whatever system you use, then add it to your project correctly.