#include<iostream>
#include<ncurses.h>
//#include<iostream>
using namespace std;
void triangle();
int main()
{
int ch;
int x;
x=20;
initscr();
keypad(stdscr,TRUE);
noecho();
The code doesn't even compile on my Linux machine:
1 2 3 4 5 6 7 8 9 10 11 12 13
/tmp/ccGKDZUT.o: In function `main':
t.cpp:(.text+0x10): undefined reference to `initscr'
t.cpp:(.text+0x17): undefined reference to `stdscr'
t.cpp:(.text+0x24): undefined reference to `keypad'
t.cpp:(.text+0x29): undefined reference to `noecho'
t.cpp:(.text+0x38): undefined reference to `move'
t.cpp:(.text+0x44): undefined reference to `stdscr'
t.cpp:(.text+0x4c): undefined reference to `wgetch'
t.cpp:(.text+0x7c): undefined reference to `move'
t.cpp:(.text+0x88): undefined reference to `stdscr'
t.cpp:(.text+0x90): undefined reference to `wgetch'
t.cpp:(.text+0xa3): undefined reference to `endwin'
collect2: ld returned 1 as End-Status