I'm trying to ask the user for an input of say, 3 characters. I want to separate the first character and the last two from each other. So if "A13" is a user input, I want to store 'A' in a separate char and "13" in a separate char[].
//initializations
char seatName[4], seatRowName, seatNumber[3];
printf("\n\nPick a seat (Row Seat) ");
scanf("%s", seatName);
seatRowName=seatName[0];
seatNumber=strchr(seatName, seatRowName);
//I get the "error: incompatible types in assignment" on the above line
Sample output:
Pick a seat (Row Seat): A13
//seatRowName = A, seatNumber=13