jinwhan   2년 전

아래 코드를 실행하고

문제의 예제인

So when I die (the [first] I will see in (heaven) is a score list).
[ first in ] ( first out ).
Half Moon tonight (At least it is better than no Moon at all].
A rope may form )( a trail in a maze.
Help( I[m being held prisoner in a fortune cookie factory)].
([ (([( [ ] ) ( ) (( ))] )) ]).
 .
.

를 입력하려고 하면 첫번째 줄인 

So when I die (the [first] I will see in (heaven) is a score list).

를 읽고 yes 출력하면서 첫번쨰 큰 while문 이 끝나는데

두번째부터 scanf가 실행이 안되고 무한루프에 빠져버립니다...

뭐가 잘못된걸까요

jinwhan   2년 전

getchar()로 버퍼 비워주거나 scanf 대신 gets로 하니까 되네요...

버퍼문제.... 였습니다....ㅠㅠ

댓글을 작성하려면 로그인해야 합니다.