Two Windows - one modified by thread random output
问题 I'm trying to write code where the screen is divided into two windows and one of them is modified by a different thread, but output seems to be very random. Could anyone help? Upper piece of console should be modified by main, and lower by thread k . #include <stdio.h> #include <ncurses.h> #include <unistd.h> #include <thread> #define WIDTH 30 #define HEIGHT 10 int startx = 0; int starty = 0; void kupa (int score_size, int parent_x, int parent_y) { int i = 0; WINDOW *dupa = newwin(score_size,