I should rephrase all of this so its in context... anyway... heres the code..
#include <stdio.h>
#include <conio.h>
#include <string.h>
char User[21], Pwd[21];
#define UN "adminun"
#define PW "adminpw"
void MkAster();
void PromScr();
int main()
{
int att = 4;
printf("Please enter the following...\n");
for (; att >= 0; att--)
{
PromScr();
if (!stricmp(User, UN) && !strcmp(Pwd, PW))
{
printf("\nUsername and Password accepted!\n\n");
break;
}
else printf("\nInvalid Username or Password\n\nYou have %i attempts more.", att);
}
return 0;
}
void PromScr()
{
printf("\nUsername: "); scanf("%s", &User);
printf("Password: "); MkAster();
}
void MkAster()
{
int i = 0, geth = 0;
do {
geth = getch();
if(geth != 13)
{
if(geth == '\b')
{
if(i!= 0)
{
printf("\b \b");
Pwd = '\0';
i--;
}
}
else if(geth == '13') printf("\b \b");
else
{
Pwd = geth;
printf("*");
i++;
}
}
} while(geth != 13 );
Pwd = '\0';
}
What i want to do is set the password as a system variable when its entered, because i'm using it to verify the programs that follow... and i need to know how to once the password and username are entered, get it to run another program..
if i need to explain anything else just ask..