So, i have to create a program to work with a menu and run differect functions with different letters used as commands, but I cant get my program to correctly Identify if a menuinput is the same as a letter or the other.
Here I keep using the letter L for input but I can't seem to get the if statement to recognized that it is the same as what is in the statement.
#include <stdio.h>
#include <string.h>
int main()
{
// setting up array and a few integers i may need//
unsigned char imgSet[10][65538] = {0} ;
//char *input;
char inputarray[2];
char *menu;
char l,L,r,R,a,A,h,H,v,V,t,T,d,D,m,M,q,Q;
char menuinput=0;
int i,vSize, hSize;
//setting the menu to a pointer
//while(menuinput != ('q' || 'Q'))
//{
menu = "*****OPTION*****MENU***** \nL: Load image \nR: Remove image \nP: Print image \nA: Average image \nH: Horizontal derivative\nV: Vertical derivative\nT: compute hisTogram\nD: search Digram\nM: local Maxima\nQ: Quit program\n*************************\n\n";
printf("%s", menu );
printf("enter option\n:");
scanf("%c", &menuinput);
printf("Input is %c \n",menuinput);
l = 'l';
L = 'L';
if(menuinput == (l || L))
printf("input is %c\n",menuinput);
else
printf("This isn't L\n");
printf("menuinput is %c\n",menuinput);
//}
}