I am getting possible use of cChoice before definition and declaration terminated incorrectly
#include<stdio.h>
#include<string.h>
#include<conio.h>
#include<iostream.h>
#include<stdlib.h>
while (chances)
{
printf("Enter User ID -> ");
scanf("%s", userId);
printf("\n");
printf("Enter Your Password -> ");
scanf("%s", passwrd);
if (strcmp(uoid, userId) == 0 && strcmp(passwrd, opasswrd) == 0)
{
printf("Correct User Id And Password\n");
break;
}
else
{
printf("Invalid User Id And Password\n\n");
chances--;
if(!chances)
{
printf("You have no more chances...\n");
printf("Do you want to register y/n -> ");
printf("\n");
if(cChoice=='Y'||cChoice=='y')
{
printf("Enter your new ID -> ");
scanf("%s",uoid);
printf("Enter your new PW -> ");
scanf("%s",opasswrd);
Line 12: cChoice is an uninitialized variable (garbage).
Line 39: You test cChoice, but cChoice is an uninitialized variable.
Line 54-55: What are the {} for?
Line 89: You're missing a } terminating the switch statement.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.