求助error C2015: too many characters in constant
#include<stdio.h>int ids(char *m)/*identify size*/
{ int n;
if(*m=='1/2'||*m=='0.5')
n=0;
if(*m=='3/4'||*m=='0.75')
n=1;
if(*m=='1')
n=2;
if(*m=='1-1/2'||*m=='1.5')
n=3;
if(*m=='2')
n=4;
if(*m=='2-1/2'||*m=='2.5')
n=5;
if(*m=='3')
n=6;
if(*m=='3-1/2'||*m=='3.5')
n=7;
if(*m=='4')
n=8;
if(*m=='4-1/2'||*m=='4.5')
n=9;
if(*m=='5')
n=10;
if(*m=='6')
n=11;
if(*m=='7')
n=12;
if(*m=='8')
n=13;
if(*m=='9')
n=14;
if(*m=='10')
n=15;
return n;
}
int idc(char *p)/*identify class*/
{ int q;
if(*p=='1')
q=0;
if(*p=='2')
q=1;
if(*p=='3')
q=2;
if(*p=='4')
q=3;
if(*p=='5')
q=4;
if(*p=='6')
q=5;
}
int main()
{
int x,y;
char *p='1-1/2';
char *q='1';
x=ids(p);
y=idc(q);
printf("%d\n%d\n",x,y);
}结果提示上述红字部分error C2015: too many characters in constant,这个有问题吗?