#include <stdio.h>
#include "funcs.h"
int main(void)
{
/* varibles */
float a[3];
char operation;
int num;
/* header print */
printf("Enter the operation you would like to use\n");
scanf("%c", &operation);
/* ifs */
if(operation == "*") //warning is here
{
printf("How many numbers would you like to use (max 4)\n");
scanf("%d", &num);
switch(num)
{
case 2:
printf("enter your numbers\n");
scanf("%f", &a[0]);
scanf("%f", &a[1]);
printf(" the answer is %2f %2f", a[0] * a[1]);
break;
}
}
}
有什么问题?我得到这个错误
Calculator.c: In function 'main':
Calculator.c:16:15: warning: comparison between pointer and integer [enabled by default]
为什么不编译请帮忙。现在请快速帮助