I have the following code.
initscr();
while ((ch = getch()) != '#')
{
system("ls");
}
endwin();
The problem is that the result is not normally printed. This is how it give me the result:
project project.c shell.c test test1.c test2.c
Project shell Signal Labs test1 test2 text.txt
However I want the result to be like this:
I mean I want it formatted in this way:
project project.c shell.c test test1.c test2.c
Project shell Signal Labs test1 test2 text.txt
I'm sure there is a missing function or something that is related to initscr()
.