我真的不知道我在做什么错了。每次我编译它时,在第四个用户输入处,它就停止并显示“进程返回”的东西。我在做什么错? (C)
#include <stdio.h>
#include <conio.h>
int main() {
char firstname[15], class, swordch0c1, swordch0c2;
int health, healthtot, armor, armortot;
printf("Hello there! Could I have your first name?\n>");
scanf("%s", firstname);
printf("\n---------------------The Legend of %s---------------------", firstname);
printf("\nPress Enter to continue.");
getch();
printf("\n\n\nYou are %s, a(n): \nA.Swordsman\nB.Assassin\nC.Archer\nD.Mage\n>", firstname);
scanf(" %c", &class);
/*swordsman story starts here*/
if (class=='a' || class=='A')
{
printf("\n\nThere you stand, at your boring everyday post.\nWhen you joined the army, you thought it would be more exciting than this.\nJust then, you see your general walking towards you.");
printf("\n\nYou quickly improve your posture. \"Soldier, I have an opportunity for you\"\nA.\"Really? What is it?\"\nB.\"I'm not interested\"\n>");
scanf(" %c", &swordch0c1);
if (swordch0c1=='b'||swordch0c1=='B')
{
printf("\n\"But... I didn't even tell you what it was. Okay, suit yourself\" You are DOOMED to a life of boredom.\n\n\n\n\n");
}
if (swordch0c1=='a'||swordch0c1=='A')
{
printf("\n\n\n\"Well, you see, there's this dragon. He's been causing big problems.\nHe's destroyed villages, harrassed the priests on the mountain,\n");
... 编辑:它允许我把第四输入。在进入后,它显示进程返回的东西。
你可以输入第四个输入吗?还是只是跳过它? – 2014-10-09 00:31:00
你将不得不展示你的整个代码(或者至少达到“第四个用户输入”的点)。 – jwodder 2014-10-09 00:31:32
@jwodder,这是直到第四个输入的代码。 – Jeremy 2014-10-09 00:33:28