Whats that ur using is it in console??

try compiling using g++ -oobjectname filename.cpp -lncurses

This is how i used in fedora to compile c++ Ncurses

Cheers!