0
how to execute code after yylex(); command如何在CMD WIN7执行时结束法输入
我有同样的问题,因为上面的问题,不能够在函数yylex()
%{
#include<stdio.h>
int vowel=0;
int cons=0;
%}
%%
"a"|"e"|"i"|"o"|"u"|"A"|"E"|"I"|"O"|"U" {printf("is a VOWEL");vowel++;}
[a-zA-z] {printf("Is a Consonant");cons++;}
%%
int yywrap()
{
return 1;
}
main()
{
printf("Enter String\n");
yylex();
printf("vowel=%d and Consonent=%d",vowel,cons);//how to execute this statement?
}
我在WIN7下面执行什么并且答案说使用Ctrl + d结束您的输入(尝试在CMD中不起作用)。
那么如何结束你的输入,使下一个语句执行?