我想用 GCC 编译这段代码,使用终端:
#include <iostream.h>
#include <stdlib.h>
int main()
{
char card_name[3];
puts("Enter the card_name:");
scanf("%2s", card_name);
int val = 0;
if (card_name[0] == 'K') {
val = 10;
} else if (card_name[0] == 'Q') {
val = 10;
} else if (card_name[0] == 'J') {
val = 10;
} else if (card_name[0] == 'A') {
val = 11;
} else {
val = atoi(card_name);
}
printf("The card value is : %i\n", val);
return 0;
}
但我得到一个错误:fatal error: iostream.h: No such file or directory
问题是什么 ?请解释完整。