#include"stdio.h"
#include"malloc.h"
#define E 欢迎您的到来!
void main()
{
char *shuru,shuru2,str[8],*a="进入",*b="退出";
printf("%s\t%s\n",a,b);
shuru=str;
scanf("%s",shuru);
if(shuru=*a) //可能写错了……
printf("调用进入软件的函数"); //*调用进入软件的函数*//
else
if(shuru=*b)
printf("再见"); //*这里需要加入goto命令!*//
else
default:printf("您输入错误"); }
}
不知道这样对不对?
#include"malloc.h"
#define E 欢迎您的到来!
void main()
{
char *shuru,shuru2,str[8],*a="进入",*b="退出";
printf("%s\t%s\n",a,b);
shuru=str;
scanf("%s",shuru);
if(shuru=*a) //可能写错了……
printf("调用进入软件的函数"); //*调用进入软件的函数*//
else
if(shuru=*b)
printf("再见"); //*这里需要加入goto命令!*//
else
default:printf("您输入错误"); }
}
不知道这样对不对?





因为在VB里的确可以用等号来判断两个字符串……不过我还是觉得用函数来判断更“标准”,因为在VB里的字符串的概念定义得很“模糊”,VB真是烂啊
)