0
나는 ncurses를 배우려고 노력하고 있지만 홀수 오류가 발생했습니다. 내 코드의ncurses LINES와 COLS는 0입니까?
관련 부분 :
#include <stdio.h>
#include <ncurses.h>
[...]
printf("%d\n%d\n%d\n",rand(),LINES,COLS);
blk[i].pos[0] = (int)(rand()/LINES);
blk[i].pos[1] = (int)(rand()/COLS);
이를 LINES와 COLS는 int
아닌 뭔가, 그렇지 않으면 0으로 설정 한 것으로 나타났습니다 출력 :
1556162876
0
0
Floating point exception
내가 뭘 잘못하고 있니? ncurses의 문서 당
추측에 아마 - initscr''호출하지? –